Python wish list

Apr 14, 2011 17:34

Now that the moratorium on Python language features is over, I'll put in my thoughts on what new stuff the language could use. I don't have much to suggest, and what I do have to suggest is fairly minor. This is because I'm happy with the language.

new on default parameters

One of the gotchas in python is that default parameters are reused, so if ( Read more... )

Leave a comment

ciphergoth April 15 2011, 07:38:14 UTC
WRT dictionary scrambling: maybe what you need is a way to arrange for your own class to take the place of "dict"?

Reply

bramcohen April 15 2011, 16:06:44 UTC
Yes, but that would involve extensive changes to my whole codebase for what should be a single call.

Reply

ciphergoth April 15 2011, 16:08:53 UTC
No, I mean a way for Python to use your class whenever you refer to "dict" or {} or similar.

Reply

bramcohen April 15 2011, 16:34:01 UTC
I don't think it has that functionality, not so much monkey patching in Python.

Reply

figg April 15 2011, 18:50:59 UTC
technically, you can monkey patch python with judicious use of ctypes, but I don't think that really counts as a solution.

Reply


Leave a comment

Up