collections.Set Binary Reflected Operations

Chris Kaynor ckaynor at zindagigames.com
Thu Jan 20 12:01:51 EST 2011


Okay, thats what I was looking for, thanks.

In my case, I'll just implement the (needed) reflected operators in my
class.

Chris


On Wed, Jan 19, 2011 at 10:02 PM, Daniel Urban <urban.dani at gmail.com> wrote:

> On Thu, Jan 20, 2011 at 01:51, Chris Kaynor <ckaynor at zindagigames.com>
> wrote:
> > I am implemented a custom set-like type which interacts with some
> > third-party software when retrieving and mutating the set, and have
> derived
> > my custom type off of collections.MutableSet, however I have noticed that
> > some of the magic methods supported by the built-in set do not fully
> > function with my custom type. From this, I looked over the
> > MutableSet definition in and it seems to be missing all of the reflected
> > operators (__rsub__, __rand__, __ror__, __rxor__, and friends) for the
> > operators it has defined. I can post a simple example case if desired.
> > I am using Python 2.6.4 (with some in-house customizations), however a
> quick
> > look over the svn repository shown on python.org makes it appear that
> these
> > are also not implemented in Python 3. I was wondering if there is some
> > reason for this, or if it was merely an oversight.
> > Chris
>
> See http://bugs.python.org/issue8743 and also
> http://bugs.python.org/issue2226
>
>
> Daniel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20110120/7d821367/attachment-0001.html>


More information about the Python-list mailing list