define

Gerhard Häring gh at ghaering.de
Thu May 8 09:09:06 EDT 2003


Turhan Ozen wrote:
> in c it is possible to define
> 
> #define PH x[1]
> 
> so PH = 3 means x[1]=3
> 
> how can I do this in python?

You can't. This is a feature, not a bug :-)

Consider using proper abstractions like functions and classes instead.

-- Gerhard





More information about the Python-list mailing list