[IronPython] operator problem

Boris Capitanu borice23 at yahoo.com
Tue Nov 29 17:23:44 PST 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 0.9.5 on .NET 2.0.50727.42
Copyright (c) Microsoft Corporation. All rights
>>> True | False
Traceback (most recent call last):
   at <shell>
TypeError: unsupported operand type(s) for |: 'bool'
and 'bool'
>>> True or False

Boris Capitanu

More information about the users mailing list