MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1w2prjy/pythonfeelsillegal/p6v503a/?context=3
r/ProgrammerHumor • u/ItsPuspendu • 2d ago
219 comments sorted by
View all comments
Show parent comments
450
And {} (= dict())
{}
dict()
7 u/chat-lu 2d ago You can also use braces for code blocks, as long as you indent properly. def main() -> None: #{ do_stuff() #} 6 u/chawmindur 2d ago I was about to say something about hashability but then I saw you've got your bases covered and commented out the braces... ... that and how something like a do_stuff() would typically be returning None anyway and hence wouldn't cause issues being placed into a set. And one final thing that this reminds me of: this classic 3 u/chat-lu 2d ago If that is maintained by an auto-formatter and not by hand, I don’t hate it.
7
You can also use braces for code blocks, as long as you indent properly.
def main() -> None: #{ do_stuff() #}
6 u/chawmindur 2d ago I was about to say something about hashability but then I saw you've got your bases covered and commented out the braces... ... that and how something like a do_stuff() would typically be returning None anyway and hence wouldn't cause issues being placed into a set. And one final thing that this reminds me of: this classic 3 u/chat-lu 2d ago If that is maintained by an auto-formatter and not by hand, I don’t hate it.
6
I was about to say something about hashability but then I saw you've got your bases covered and commented out the braces...
... that and how something like a do_stuff() would typically be returning None anyway and hence wouldn't cause issues being placed into a set.
do_stuff()
None
And one final thing that this reminds me of: this classic
3 u/chat-lu 2d ago If that is maintained by an auto-formatter and not by hand, I don’t hate it.
3
If that is maintained by an auto-formatter and not by hand, I don’t hate it.
450
u/chawmindur 2d ago
And
{}(=dict())