Re: overriding = operator

2008-04-23 Thread Anton Mellit
On Apr 22, 3:54 pm, Paul McGuire <[EMAIL PROTECTED]> wrote: > On Apr 22, 8:47 am, "Anton Mellit" <[EMAIL PROTECTED]> wrote: > > > > > I need something like > > 'overriding' =, which is impossible, but I look for a systematic > > approach to do something instead. It seems there are two ways to do >

Re: overriding = operator

2008-04-22 Thread Paul McGuire
On Apr 22, 8:47 am, "Anton Mellit" <[EMAIL PROTECTED]> wrote: > I need something like > 'overriding' =, which is impossible, but I look for a systematic > approach to do something instead. It seems there are two ways to do > what I need: > > 1. Implement a method 'assign' which generates the corres

overriding = operator

2008-04-22 Thread Anton Mellit
Hi, I am developing something like a compiler in Python, a library that would help to generate machine-language code. One of the features is the following. When I want to generate a piece of code I want to declare variables as follows: x = var() y = var() This would generate no code, but it wou