MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1w2prjy/pythonfeelsillegal/p6v1jbl/?context=3
r/ProgrammerHumor • u/ItsPuspendu • 2d ago
219 comments sorted by
View all comments
1.0k
theres main() in python
444 u/chawmindur 2d ago And {} (= dict()) 6 u/chat-lu 2d ago You can also use braces for code blocks, as long as you indent properly. def main() -> None: #{ do_stuff() #} 5 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.
444
And {} (= dict())
{}
dict()
6 u/chat-lu 2d ago You can also use braces for code blocks, as long as you indent properly. def main() -> None: #{ do_stuff() #} 5 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
You can also use braces for code blocks, as long as you indent properly.
def main() -> None: #{ do_stuff() #}
5 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.
5
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.
1.0k
u/belabacsijolvan 2d ago
theres main() in python