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

BUG,DOC,ENH,UBY: output lines are filtered by bool() #18

Open
1 task
westurner opened this issue Aug 19, 2015 · 4 comments
Open
1 task

BUG,DOC,ENH,UBY: output lines are filtered by bool() #18

westurner opened this issue Aug 19, 2015 · 4 comments

Comments

@westurner
Copy link
Owner

output text lines are filtered by bool(),
so, empty text lines (lines that do not contain a \n) are not filtered out, but e.g. an iterable with pyline.pyline that returns e.g. zero, [], () will be filtered out.

  • (... see pandas for handling N/A, None)
  • does this trim a blank trailing line ([...])?
    • echo -e '\n\n' | pyline.py prints two(+1 from echo) blank lines
    • echo -e '0' | pyline.py prints '0' (+1 blank line from echo) [because it's not casted to e.g. int]
@westurner
Copy link
Owner Author

  • it may be helpful to add a filterfunc=bool kwarg and sensible CLI defaults for e.g. passing a callable that can return 0, None.

@westurner
Copy link
Owner Author

-O json may have different output characteristics (e.g. output everything as JSON) because this

@westurner
Copy link
Owner Author

Backwards-compatible:

  • --no-strip-emptylines

Less surprising:

  • --strip-emptylines

@westurner
Copy link
Owner Author

see also: #19

@westurner westurner changed the title DOC: output lines are filtered by bool() BUG,DOC,ENH,UBY: output lines are filtered by bool() Dec 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant