I freelance in both python and C#, python used to get the job done in 200 lines vs C# at 500, now its 300|300 and the C# is easier to read
Python programming is drowning in red tape
31–40 of 183 posts
Re: Python programming is drowning in red tape
#32As a long time Python fan, I find the current state of the language frustrating. Tools like black and poetry are nice, but are not part of the standard library. Yet they seem to be required by every popular project out there. (Also, black’s formatting is quite ugly, as noted in this blog post) Meanwhile, the language itself is increasingly baroque and complicated. Type-annotated, asyncio-enabled Python hardly resembl…
> Type-annotated, asyncio-enabled Python hardly resembles the easy-to-understand language I fell in love with back in 2006. true. i am all for types in general and for types annotations in python. but i have seen some heavily type-annotated python code lately and i don't think that's where we want to be. we are starting to look like a heavily templatized cpp code.
- mypy: that's another story, but it's also optional, use it if you want... (my opinion, like in typescript, if I want types I will do it with go or rust)
Re: Python programming is drowning in red tape
#33As a long time Python fan, I find the current state of the language frustrating. Tools like black and poetry are nice, but are not part of the standard library. Yet they seem to be required by every popular project out there. (Also, black’s formatting is quite ugly, as noted in this blog post) Meanwhile, the language itself is increasingly baroque and complicated. Type-annotated, asyncio-enabled Python hardly resembl…
> Type-annotated, asyncio-enabled Python hardly resembles the easy-to-understand language I fell in love with back in 2006. true. i am all for types in general and for types annotations in python. but i have seen some heavily type-annotated python code lately and i don't think that's where we want to be. we are starting to look like a heavily templatized cpp code.
Which was my main concern when type-hints were added
Give a hand to the strong-typed people and they will take the whole arm.
They will take Python as "now it's like Java" and will push it all the way through.
Re: Python programming is drowning in red tape
#34Earlier quoted context omitted.
> Type-annotated, asyncio-enabled Python hardly resembles the easy-to-understand language I fell in love with back in 2006. true. i am all for types in general and for types annotations in python. but i have seen some heavily type-annotated python code lately and i don't think that's where we want to be. we are starting to look like a heavily templatized cpp code.
Don't mix things, guy! - asyncio it's one thing: From my point of view it's amazing... makes python be able to compete with nodejs or go.. (not so hard, if you work also on the browser) - mypy: that's another story, but it's also optional, use it if you want... (my opinion, like in typescript, if I want types I will do it with go or rust)
Re: Python programming is drowning in red tape
#35Earlier quoted context omitted.
> Tools like black and poetry are nice, but are not part of the standard library. If black does non-PEP 8 formatting, as the article says, then I would not expect it to be in the standard library, since PEP 8 formatting is the Python standard. > the language itself is increasingly baroque and complicated I don't find current Python 3 any more baroque or complicated than Python 2.7. In fact I have plenty of Python cod…
> You don't have to use these features if you don't want or need them. Nobody uses 100% of any language's features, and the subset that is used can be very different from person to person. I don't see that as a problem. The problem is that other people might use those features and you also might have to read the code created by those people.
Re: Python programming is drowning in red tape
#36As a long time Python fan, I find the current state of the language frustrating. Tools like black and poetry are nice, but are not part of the standard library. Yet they seem to be required by every popular project out there. (Also, black’s formatting is quite ugly, as noted in this blog post) Meanwhile, the language itself is increasingly baroque and complicated. Type-annotated, asyncio-enabled Python hardly resembl…
> Type-annotated, asyncio-enabled Python hardly resembles the easy-to-understand language I fell in love with back in 2006. true. i am all for types in general and for types annotations in python. but i have seen some heavily type-annotated python code lately and i don't think that's where we want to be. we are starting to look like a heavily templatized cpp code.
Re: Python programming is drowning in red tape
#37Line length is such a hard problem to solve. I wish there was a way to be like don’t allow more than 95% percent of my lines to be longer than X. I run into this in Django a lot with my chained ORM queries. The usually tend to be like 10-15 chars to long. And in this case you have to line break on the parameters or on a ‘.’ which is ugly as well. While not related to Python, I feel like whenever I write JS code, espe…
My personal preference regarding line lengths: 80 chars are not enough. And even pep8 says that "foolish consistency is the hobgoblin of little minds"
So try being under 80 chars but sometimes you can't. Also don't break a line that's like 85 chars if it will just make it more ugly
I'm glad Prospector by default doesn't enforce "the cult of 80 chars" dogma
Re: Python programming is drowning in red tape
#38Therefore...
> My problem with the above formatting is that the list of arguments and the body of the function are now at the same indentation level.
OP weirdly complains here that equal scopes shouldn't be equally indented, and, let's be clear, declared function arguments are the same scope as the function body.
> My point is that the proper way to indent the above code is...
OP is dumb and wrong and should feel bad for missing the first section of PEP8 right after the introduction. It's titled "A Foolish Consistency is the Hobgoblin of Little Minds".
OP's proposed "correct" way is to arbitrarily leapfrog an indentation level and then backtrack. Personally I think that makes OP a bad person. As an adherent of The One True Brace Style (K&R), I find OP's proposal to be super ugly and much harder to read than Black's style.
> PEP8 recommends
PEP8 can recommend anything it wants. That particular recommendation is bad and not based on anything other than Guido's personal preference. It's fine for Guido to have preferences, but OP should feel bad for _demanding_ it.
> I decided to do the unthinkable: fork it
It's open source software on github. Forkability is literally the point.
> *I don’t know if you ever saw the code of black. It..."
...gets the job done well and is therefore extremely popular? Yes.
Re: Python programming is drowning in red tape
#39As a long time Python fan, I find the current state of the language frustrating. Tools like black and poetry are nice, but are not part of the standard library. Yet they seem to be required by every popular project out there. (Also, black’s formatting is quite ugly, as noted in this blog post) Meanwhile, the language itself is increasingly baroque and complicated. Type-annotated, asyncio-enabled Python hardly resembl…
Theres always Ruby
Re: Python programming is drowning in red tape
#40I personally use black but I wouldn't mind other standards as long as I don't have to pick and choose anymore.