[Python-ideas] IntFlags
Neil Girdhar
mistersheik at gmail.com
Sun Mar 8 16:50:12 CET 2015
For what it's worth, I really like your patch. My suggestion is to change
a couple dozen lines so that IntFlags uses composition rather than
inheritance, and provides setattr and getattr. As far as I can tell, this
would still be a "drop-in replacement", although I'm still not sure in
which contexts this has to work.
Best,
Neil
On Saturday, March 7, 2015 at 2:40:29 PM UTC-5, Serhiy Storchaka wrote:
>
> On 07.03.15 21:02, Neil Girdhar wrote:
> > A drop-in replacement for what? Is there a lot of Python code that
> > manipulates flags that you expect people to convert to IntFlags from
> > int? Isn't the point of IntFlags for writing new code?
>
> No, the point of IntFlags to be drop-in replacement for integer
> constants used as flags. See my patch in issue23591.
>
> _______________________________________________
> Python-ideas mailing list
> Python... at python.org <javascript:>
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150308/e510edb9/attachment.html>
More information about the Python-ideas
mailing list