4 ms·
* Not only is print better as a function (I can now call print in a lambda!) doing anything beyond just printing variables (e.g. printing to a stream/file or su
by masklinn 9y ago
* Not only is print better as a function (I can now call print in a lambda!) doing anything beyond just printing variables (e.g. printing to a stream/file or suppressing the final newline) is both more straightforward and more readable. Also print(xxx, end="", flush=True) is my bae.
* API-wise keyword-only parameters are absolutely fantastic, even (especially!) for non-default params.
* Extended unpacking, and the ability to unpack in collection literals, make the language much more "expressive" (in the sense there are more cases where you can make do with just expressions) which is very convenient.
- speedplane 9y agoThere are some great things about Python 3, and then there are some things that are more subjective. But we have to ask at what cost? Breaking compatibility has required developers to spend huge amounts of time porting and worrying about compatibility that they could have spent on other things. Many of the best features of Python 3 could be introduced in a backwards compatible way. Further, the language itself could have advanced much faster if it stuck with compatible changes. We could have had microthreads or a JIT by now. Even if you like "print" as a function, is it really so important to wipe out the huge inventory of working Python 2 code and stall Python development for a decade? Python 3 is a tragedy.
- masklinn 9y ago> the language itself could have advanced much faster if it stuck with compatible changes. We could have had microthreads or a JIT by now. That is asinine bullshit and you should be ashamed. > stall Python development for a decade? The development of Python never stalled, it barely even slowed.
- speedplane 9y ago> That is asinine bullshit and you should be ashamed. ... The development of Python never stalled, it barely even slowed. Thanks for the language, but the only thing I'm ashamed of is Python's lost opportunities. How many thousands or perhaps millions of hours of developer time was spent on compatibility or maintaining two versions? What if that energy was directed on the improving the language instead. There's no question that it would be further along than it is now.
- masklinn 9y ago> Thanks for the language Thanks for the lying. > the only thing I'm ashamed of is Python's lost opportunities. Sure you are bud. > There's no question that it would be further along than it is now. Unless you're a core dev or have core dev testimony on the subject you're just making up more bullshit on the spot to support the previous bullshit you pulled out of thin air. Please stop lying in the future, and have a nice day.
- OOPMan 9y agoEr, maybe you never heard of Stackless Python (micro-threads) or PyPy (JIT)?
- speedplane 9y agoOf course I have, they were what I was referring to. If we didn't have to deal with this python 2/3 schism, there's a solid chance they'd be part of mainline python by now.
- philsheard 9y agoThanks for the keyword-only parameters mention. I'm a Py3 fan so have been looking down this thread for inspiration of features I've missed. I've often wanted to use keyword arguments for readability but without supplying a default - this is just the ticket.
- OOPMan 9y agoIndeed. Not enough people seem to be aware of the new dict merge feature introduce: merged_dict = { **source_dict1, **source_dict2, **{ 'some_key': 'w00t!' } }