Why '==' ??

Fuzzyman michael at foord.net
Thu Apr 1 02:24:00 EST 2004


[snip..]
> 
> Why not !
> Stop complain about choice !
> 
> If you want another syntax, you can imagine yours.
> What you need is rather simple :
> Create a parser and an Abstract Syntax Tree from the parser. Then you 
> can still use python to bytecompile it ( with compiler.pycodegen ).
> That way you will be able to use the python library but have your 
> favorite syntax with brackets, '=' or ':=' assignement, etc...
> 
> Also had a hook on the import statement to automatically byte-compile 
> your file when requested and that's all !
> 
> I'm playing with that kind of stuff. That is really fun and easy...
> 
> Yermat

My goodness !!
Now there's an option..... Define my own syntax - but use the CPython
compiler.............

lol

Actually I think python is fine - just pointing out a couple of
features of syntax that seemed unnecessary.

In actual fact I accept the explanation for '==' it was a 'feature' of
language that I didn't realise existed.

(Like 
a = value or default
which I discovered recently... very useful in certain circumstances).

Having said that I *Still* think that :

if a = 3:
is unambiguous - so there's no real reason that the interpreter should
wag it's finger and say ... "you forgot to put in one of the '=' and I
refuse to continue until you do" :-)

Regards,



Fuzzy
http://www.voidspace.org.uk/atlantibots/pythonutils.html



More information about the Python-list mailing list