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 Python-Ideas [1].

The patch includes tests and few examples of using IntFlags in the stdlib.

[1] http://comments.gmane.org/gmane.comp.python.ideas/32267

----------
components: Library (Lib)
files: intflags.patch
keywords: patch
messages: 237269
nosy: barry, eli.bendersky, ethan.furman, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Add IntFlags
type: enhancement
versions: Python 3.5
Added file: http://bugs.python.org/file38344/intflags.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue23591>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to