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... )
Comments 23
Reply
Reply
Since the dictionary objects are only kept in the hash table and iteration just walks through that table looking for objects, there'd be no way to scramble the contents in-place. Objects can only be in one place for a given hash value. You'd have to implement this by iterating the dictionary into a list and shuffling that list in place (like random.shuffle does), so you might as well do it yourself.
^ on bytes is an obvious feature, though, you're absolutely right. I might actually write a patch for that myself...
Reply
Does struct work on arbitrary size integers and allow completely cross-platform operation? The documentation is less than ideal.
Reply
Reply
Reply
Reply
Reply
Reply
Reply
Reply
def spam(eggs = new {3: ['a', 'b', 'c']})
Reply
Reply
Reply
Reply
Reply
Leave a comment