Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove default separator from itemize() #545

Merged
merged 1 commit into from
Nov 26, 2023
Merged

Remove default separator from itemize() #545

merged 1 commit into from
Nov 26, 2023

Conversation

mih
Copy link
Member

@mih mih commented Nov 23, 2023

This addresses an issues brought up in
#539 (comment)

This changeset removes the default argument to avoid the impression that "line-processing" is the main target. The code does not imply that, and the existing usage also not.

The possibility to do line-splitting is not touched (or removed). The documentation needs no adjustment.

This addresses an issues brought up in
datalad#539 (comment)

This changeset removes the default argument to avoid the impression that
"line-processing" is the main target. The code does not imply that,
and the existing usage also not.

The possibility to do line-splitting is not touched (or removed). The
documentation needs no adjustment.
Copy link

codecov bot commented Nov 23, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (f2a6fe4) 92.66% compared to head (03e9500) 92.66%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #545   +/-   ##
=======================================
  Coverage   92.66%   92.66%           
=======================================
  Files         137      137           
  Lines       10031    10031           
  Branches     1085     1085           
=======================================
  Hits         9295     9295           
  Misses        712      712           
  Partials       24       24           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@christian-monch
Copy link
Contributor

christian-monch commented Nov 24, 2023

I think we are actually mostly line-based, even if the line terminator is often '\0'. For example, the git ls-files manpage says:

-z
    \0 line termination on output and do not quote filenames. See OUTPUT below for more information.

But I also think it makes sense to let the user provide a separator, especially because not providing a separator will reduce performance. But we should probably highlight the fact that passing None as a separator will result in using all standard line splitting patterns that are built into python.

@mih
Copy link
Member Author

mih commented Nov 26, 2023

Thanks for the feedback!

@mih mih merged commit 4bb678b into datalad:main Nov 26, 2023
8 of 9 checks passed
@mih mih deleted the itemize branch November 26, 2023 19:53
@mih mih added this to the 1.1 milestone Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants