[IronPython] operator problem

Boris Capitanu borice23 at yahoo.com
Wed Nov 30 02:23:44 CET 2005


Hello again.

Any reason why the "|" operator in not supported in
IronPython?  I can see that "or" is supported, but I'd
like to be able to say something like:

stateChanged |= menuChanged

This sort of assignment works under CPython, but not
IronPython.

IronPython 0.9.5 on .NET 2.0.50727.42
Copyright (c) Microsoft Corporation. All rights
reserved.
>>> True | False
Traceback (most recent call last):
   at <shell>
TypeError: unsupported operand type(s) for |: 'bool'
and 'bool'
>>> True or False
True


Boris Capitanu



More information about the Ironpython-users mailing list