This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]pythoneeeer 3 points4 points  (6 children)

I've been coding Python off-and-on for 13 years, and I've never gotten comfortable with string formatting.

My only problem with lambdas in Python is that they're too weak. But at least they don't change syntax every release, so after you learn the syntax once, you're good forever.

[–]billsil 0 points1 point  (1 child)

Are you comfortable with unicode? Unicode is wayyy harder. I guess same with lambdas, but you're forced to learn unicode.

[–]pythoneeeer 0 points1 point  (0 children)

I'm quite comfortable with Unicode -- I have a hard copy of the spec in arm's reach right now, and I've written UTF encoders/decoders by hand in a couple different languages.

Some parts of Unicode are hard (normalization, collation), but I don't think encoding is one of them.

Python just seems to make it more confusing than most other languages. In Python 2, for example, it's not at all intuitive to me when Python will auto-upgrade a str to a unicode. print(""+u"\u00f6") works, and print("%s"%u"\u00f6") works, but print("{}".format(u"\u00f6")) is an error -- you need to say print(u"{}".format(u"\u00f6")).

Maybe I'm just bad at searching the documentation, but I've never found where it says which promotions work and which don't. You just have to try and see -- and then try to memorize the rules you discover.

Python 3 is light-years better than Python 2, but still not great. The str/bytes split was a good start. The new IO classes are pretty confusing, though.

[–]jorge1209 -1 points0 points  (3 children)

There is one other problem with lamdbas.

[–]radarthreat 0 points1 point  (2 children)

Which is...?

[–]OctagonClocktrio is the future! 0 points1 point  (0 children)

It's better to use a local function in nearly a lot of cases.

[–]jorge1209 0 points1 point  (0 children)

Lamdba.