Peter's Web Site

June 19, 2007

Python 3k Features

Guido has posted a summary/status update on Python 3000. So many nifty things to look forward to!

  • An explicit 'bytes' type
  • format() function that understands "{inst.foo.bar}" and "{dict[key]}"
  • Function signature annotations for input and output types
  • Custom class dictionaries
  • A taxonomy of Abstract Base Classes for common built-in types
  • Enforceable pure-abstract methods
  • Unified long and short ints (finally getting rid of the ugly "L" suffix"
  • Binary literals (finally)
  • 'nonlocal' statement (seems like one could do some fairly interesting continuations magic with this)
  • Set literals and Set comprehensions

So much good stuff... Python's metaprogramming capabilities just keep growing. I wonder how of this will be backported to 2.6.

June 11, 2007

Your Secrets

To step out of your cradle is like coming down
I just had somebody tell me I was introspective to a fault
I'll be a doozer if I can
But I will contented be right now if we could keep our secret

You could tell me all your secrets
All you want to do is run and hide
You can keep it inside
If you tell me all your secrets
I can keep it inside
But if it's as it seems, and I keep having dreams
About the two of us, then it's obvious
You should stop treating me like I was just a child
You should start treating me like I was just as wild as you

To step out of you cradle is like coming down
I just had somebody tell me I was introspective to a fault
I'll be a doozer if I can
But I will contented be right now if we could keep our secret

We could be a little closer
The mystery you're trying to preserve
You don't need in reserve
We could get a little closer
Intimacy has the greater charm
And it would do no harm
To give a little way, oh please stop holiding sway
You could even read me your poetry
If you could stop treating me like I was just a child
You should start treating me like I was just as wild as you