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

Consider using parenthesis to avoid backslash line continuation in examples #64

Closed
andybak opened this issue Apr 2, 2016 · 1 comment

Comments

@andybak
Copy link

andybak commented Apr 2, 2016

I'm guessing one of your design goals is beauty and readability. Would it create a nicer first impression to see:

result = (seq(1, 2, 3, 4)
        .map(lambda x: x * 2)
        .filter(lambda x: x > 4)
        .reduce(lambda x, y: x + y)
)

I understand that this is a personal preference so feel free to disagree :)

@EntilZha
Copy link
Owner

EntilZha commented Apr 2, 2016

I actually didn't know that you could do this, but it makes sense. I will definitely update the docs to at least show that trick once (I too agree backslashes are inconvenient). Thanks!

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

No branches or pull requests

2 participants