Live data from Hacker News

Hidden features of Python - Stack Overflow

stackoverflow.com

1–10 of 17 posts

Re: Hidden features of Python - Stack Overflow

#3
post #2

Dupe of: - http://news.ycombinator.com/item?id=1512930 - http://news.ycombinator.com/item?id=594210 I don't mind being reminded to see if there's anything new, though.

I've seen it here before, but yesterday I happened to stumble across it again, learned something new, and figured maybe other people on HN would benefit from it too.

Re: Hidden features of Python - Stack Overflow

#5
post #4

Obligatory XKCD: http://xkcd.com/353/

XKCD is never obligatory.

Seriously, why is anyone "obligated" to post a comic that mentions Python, but adds nothing of substance, and isn't even funny? (http://www.google.com/search?q=site%3Anews.ycombinator.com+%...)

Re: Hidden features of Python - Stack Overflow

#6
Hidden features in a programming language? Granted, most of these aren't "hidden", but they're nonobvious because the language is incredibly complex and it's difficult to predict from first principles that any of these things would actually work.

Long ago, a rule of programming language design was handed down by the great old hackers, but it has been forgotten and much needless effort has been spent as a result. It's time to remind language designers of the rule again:

"Programming languages should be designed not by piling feature on top of feature, but by removing the weaknesses and restrictions that make additional features appear necessary."

Re: Hidden features of Python - Stack Overflow

#7
post #4

Obligatory XKCD: http://xkcd.com/353/

XKCD is never obligatory. Seriously, why is anyone "obligated" to post a comic that mentions Python, but adds nothing of substance, and isn't even funny? ( http://www.google.com/search?q=site%3Anews.ycombinator.com+%... )

Why? That's easy: I made a deal with Randall Munrow and as a result I'm legally obligated to post links to XKCD comics all over the web!

Seriously though. I enjoy reading XKCD and the first thing I thought of when I read the title of the post was that comic. Sorry for offending your delicate sense of humor. ;)

Re: Hidden features of Python - Stack Overflow

#8

Hidden features in a programming language? Granted, most of these aren't "hidden", but they're nonobvious because the language is incredibly complex and it's difficult to predict from first principles that any of these things would actually work. Long ago, a rule of programming language design was handed down by the great old hackers, but it has been forgotten and much needless effort has been spent as a result. It's…

Some of those features are just some fancy libraries, or syntactic sugar that you can ignore, if you want to. They don't make the language itself more complicated.

Re: Hidden features of Python - Stack Overflow

#9
post #4

Obligatory XKCD: http://xkcd.com/353/

XKCD is never obligatory. Seriously, why is anyone "obligated" to post a comic that mentions Python, but adds nothing of substance, and isn't even funny? ( http://www.google.com/search?q=site%3Anews.ycombinator.com+%... )

Well, "import antigravity" is sure enough a hidden feature of python. Well hidden. So hidden that I couldn't find it in any version of the interpreter :)

Re: Hidden features of Python - Stack Overflow

#10

Hidden features in a programming language? Granted, most of these aren't "hidden", but they're nonobvious because the language is incredibly complex and it's difficult to predict from first principles that any of these things would actually work. Long ago, a rule of programming language design was handed down by the great old hackers, but it has been forgotten and much needless effort has been spent as a result. It's…

Can you go into specifics about how any of these examples are non-obvious because the language is incredibly complex?

In the context of higher level and or dynamic languages, I'd argue that Python is rather low on the complexity scale

Post reply on HN