Dictionaries and dot notation

Martin Drautzburg Martin.Drautzburg at web.de
Sun Apr 22 12:33:24 EDT 2007


> mydata = data( )
> mydata.foo = 'foo'
> mydata.bar = 'bar'
> 
> print mydata.foo
> print mydata.bar

I am aware of all this.
Okay let me rephrase my question: is there a way of using dot notation
without having to create a class?



More information about the Python-list mailing list