This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author zach.ware
Recipients barry, belopolsky, brett.cannon, eric.araujo, ncoghlan, rhettinger, ron_adam, serhiy.storchaka, zach.ware
Date 2013-07-15.14:30:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1373898645.58.0.882239381936.issue18436@psf.upfronthosting.co.za>
In-reply-to
Content
The purpose is to make usage of the operator module more readable, particularly for some of the more exotic operators.  For instance, I find ``operator.get_op(">>=")`` to be a lot more obvious about what's going to happen than ``operator.irshift``.

Also, I think it is helpful to have available a listing of all the operators that Python supports.  If we're going to have such a listing, why not make it a mapping of op to function?  And once we have such a mapping, it would be nice to have a nice interface to it.

Having this available would make it easy to implement the kind of function that Nick mentioned in the python-ideas thread, that takes an operator string instead of only a function.

I will admit that the need is not great, and obviously this isn't something that someone who needs it couldn't do themselves.  But I think the convenience of it makes it at least worth consideration.
History
Date User Action Args
2013-07-15 14:30:45zach.waresetrecipients: + zach.ware, barry, brett.cannon, rhettinger, ncoghlan, belopolsky, ron_adam, eric.araujo, serhiy.storchaka
2013-07-15 14:30:45zach.waresetmessageid: <1373898645.58.0.882239381936.issue18436@psf.upfronthosting.co.za>
2013-07-15 14:30:45zach.warelinkissue18436 messages
2013-07-15 14:30:45zach.warecreate