[issue23591] Add IntFlags

2016-07-10 Thread Ethan Furman
Ethan Furman added the comment: I don't think I'll have this in before the next alpha (today? tomorrow?) but I'll get it merged in the next couple weeks (need to do some integration work with the other Enum enhancements). -- ___ Python tracker

[issue23591] Add IntFlags

2016-07-06 Thread Ethan Furman
Ethan Furman added the comment: Reviewing... -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue23591] Add IntFlags

2016-07-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ping again. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue23591] Add IntFlags

2016-06-21 Thread Ethan Furman
Ethan Furman added the comment: Just look briefly through your patches, and they look pretty good. I'll take a more in-depth look in the next couple weeks. (Feel free to ping again if you don't see any activity from me, and thanks for your patience.) --

[issue23591] Add IntFlags

2016-06-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What should be done for landing this in 3.6? -- ___ Python tracker ___

[issue23591] Add IntFlags

2015-07-21 Thread Ethan Furman
Ethan Furman added the comment: My experience is that a module maintainer, or somebody claiming to speak for the module maintainer, can close any issue in their area at any time regardless of the number of core devs in favor of a change. Whatever. I'll leave this open and write up a spec of

[issue23591] Add IntFlags

2015-07-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Why have you rejected this issue Ethan? I think this is useful feature and must be in Python, and other core developers agreed with this. Only minor implementation details are discussable. -- ___ Python tracker

[issue23591] Add IntFlags

2015-07-21 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- resolution: - rejected stage: patch review - status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23591 ___

[issue23591] Add IntFlags

2015-07-21 Thread R. David Murray
R. David Murray added the comment: Ethan: to clarify...based on my years of watching this tracker, the way we normally handle an issue like this is to leave the issue open until it is resolved, sometimes with people proposing competing patches. (There might be reasons to change that

[issue23591] Add IntFlags

2015-07-21 Thread R. David Murray
R. David Murray added the comment: I agree. Closing this does not follow our normal development workflow, since there has been a consensus in favor and none for rejection. If you think the API needs wider discussion a new thread can be started on python-ideas. -- nosy:

[issue23591] Add IntFlags

2015-03-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I choose repr() so that for single flag it looks as for IntEnum instance. Other variants except Perm.R|Perm.W: 3 have different format. Perm.R|Perm.W: 3 is too verbose, it repeats the same class name multiple times. But I don't like current repr. Other

[issue23591] Add IntFlags

2015-03-07 Thread Martin Panter
Martin Panter added the comment: It would make more sense and be more consistent if the str() and repr() used one’s complement in all cases, i.e.: self.assertEqual(str(Perm(~0)), ~0) Also, the repr() seems to be doing a bad attempt at Python pseudo code. Instead of Perm.R|W: 3 maybe it

[issue23591] Add IntFlags

2015-03-07 Thread Ethan Furman
Ethan Furman added the comment: The current patch is more along the lines of a proof-of-concept. The final IntFlag type (if there is one) would be quite a bit more extensive since part of the reason for its existence is to not lose type -- so pretty much every __op__ would have to be

[issue23591] Add IntFlags

2015-03-05 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23591 ___ ___

[issue23591] Add IntFlags

2015-03-05 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Here is preliminary implementation of IntFlags (no docs). This is an int subclass purposed to represent a set of integer flags. It supports named constants (as IntEnum), supports bitwise operations (, |, ~) and has funny str and repr. See discussion on

[issue23591] Add IntFlags

2015-03-05 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- assignee: - ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23591 ___ ___