Differences between Boo and Python (WAS: Re: [IronPython] Re: users-ironpython.com Digest, Vol 7, Issue 5)
Burning
KarmaSlave at MyRealBox.com
Thu Feb 24 17:16:44 CET 2005
Luis M. Gonzalez wrote:
>
> a = 5 ---> ( you don't need to declare its type here, because it is
> inferred as "int" )
> a = 'hello' ( you can't do that, because "a" has been previously
> inferred as "int")
Actually, you can do this to mimick Python:
(careful, your newsreader might think these are quotes instead of
prompts from the Boo Interpreter.)
>>> a as duck
>>> a = 5
5
>>> a = 'hello'
'hello'
>>> a = []
[]
>>> a = (1, 2, 3)
(1, 2, 3)
>>> a = {"ham":"sandwich"}
{'ham': 'sandwich'}
>>>
More information about the Ironpython-users
mailing list