Dictionaries and dot notation

Ben Finney bignose+hates-spam at benfinney.id.au
Sun Apr 22 22:54:27 EDT 2007


Martin Drautzburg <Martin.Drautzburg at web.de> writes:

> Okay let me rephrase my question: is there a way of using dot
> notation without having to create a class?

Dot notation, e.g. 'foo.bar', is parsed by the interpreter as "access
the attribute named 'bar' of the object 'foo'". Objects have
attributes either by virtue of the class having them, or the object
getting them assigned after creation.

Can you describe what you would change in the above, or can you
re-word your request based on these facts?

-- 
 \       "Our products just aren't engineered for security."  -- Brian |
  `\             Valentine, senior vice-president of Microsoft Windows |
_o__)                                                      development |
Ben Finney



More information about the Python-list mailing list