/snap/core18/2979/usr/lib/python3.6/__pycache__
NameSizeModeActions
abc.cpython-36.pyc75150644editdlrm
aifc.cpython-36.pyc259430644editdlrm
antigravity.cpython-36.pyc7790644editdlrm
argparse.cpython-36.pyc604560644editdlrm
ast.cpython-36.pyc117040644editdlrm
asynchat.cpython-36.pyc68150644editdlrm
asyncore.cpython-36.pyc158380644editdlrm
base64.cpython-36.pyc170590644editdlrm
bdb.cpython-36.pyc170330644editdlrm
binhex.cpython-36.pyc120860644editdlrm
bisect.cpython-36.pyc26760644editdlrm
bz2.cpython-36.pyc112820644editdlrm
calendar.cpython-36.pyc258820644editdlrm
cgi.cpython-36.pyc284160644editdlrm
cgitb.cpython-36.pyc100800644editdlrm
chunk.cpython-36.pyc49000644editdlrm
cmd.cpython-36.pyc125750644editdlrm
code.cpython-36.pyc98360644editdlrm
codecs.cpython-36.pyc339000644editdlrm
codeop.cpython-36.pyc62700644editdlrm
colorsys.cpython-36.pyc33110644editdlrm
compileall.cpython-36.pyc82780644editdlrm
configparser.cpython-36.pyc452440644editdlrm
contextlib.cpython-36.pyc111580644editdlrm
copy.cpython-36.pyc70790644editdlrm
copyreg.cpython-36.pyc42440644editdlrm
cProfile.cpython-36.pyc42940644editdlrm
crypt.cpython-36.pyc22420644editdlrm
csv.cpython-36.pyc118550644editdlrm
datetime.cpython-36.pyc545110644editdlrm
decimal.cpython-36.pyc3510644editdlrm
difflib.cpython-36.pyc596420644editdlrm
dis.cpython-36.pyc141810644editdlrm
doctest.cpython-36.pyc755890644editdlrm
dummy_threading.cpython-36.pyc11020644editdlrm
enum.cpython-36.pyc234530644editdlrm
filecmp.cpython-36.pyc83050644editdlrm
fileinput.cpython-36.pyc131520644editdlrm
fnmatch.cpython-36.pyc28740644editdlrm
formatter.cpython-36.pyc175790644editdlrm
fractions.cpython-36.pyc184260644editdlrm
ftplib.cpython-36.pyc283570644editdlrm
functools.cpython-36.pyc240620644editdlrm
genericpath.cpython-36.pyc37260644editdlrm
getopt.cpython-36.pyc62170644editdlrm
getpass.cpython-36.pyc41770644editdlrm
gettext.cpython-36.pyc143060644editdlrm
glob.cpython-36.pyc42590644editdlrm
gzip.cpython-36.pyc162260644editdlrm
hashlib.cpython-36.pyc66920644editdlrm
heapq.cpython-36.pyc142920644editdlrm
hmac.cpython-36.pyc48360644editdlrm
imaplib.cpython-36.pyc421380644editdlrm
imghdr.cpython-36.pyc41500644editdlrm
imp.cpython-36.pyc96960644editdlrm
inspect.cpython-36.pyc797390644editdlrm
io.cpython-36.pyc33870644editdlrm
ipaddress.cpython-36.pyc623860644editdlrm
keyword.cpython-36.pyc17650644editdlrm
linecache.cpython-36.pyc37780644editdlrm
locale.cpython-36.pyc340300644editdlrm
lzma.cpython-36.pyc119920644editdlrm
macpath.cpython-36.pyc56410644editdlrm
macurl2path.cpython-36.pyc18670644editdlrm
mailbox.cpython-36.pyc637520644editdlrm
mailcap.cpython-36.pyc72090644editdlrm
mimetypes.cpython-36.pyc155530644editdlrm
modulefinder.cpython-36.pyc153660644editdlrm
netrc.cpython-36.pyc38360644editdlrm
nntplib.cpython-36.pyc337800644editdlrm
ntpath.cpython-36.pyc131900644editdlrm
nturl2path.cpython-36.pyc14990644editdlrm
numbers.cpython-36.pyc121420644editdlrm
opcode.cpython-36.pyc54130644editdlrm
operator.cpython-36.pyc139130644editdlrm
optparse.cpython-36.pyc480540644editdlrm
os.cpython-36.pyc296280644editdlrm
pathlib.cpython-36.pyc420070644editdlrm
pdb.cpython-36.pyc460940644editdlrm
pickle.cpython-36.pyc426910644editdlrm
pickletools.cpython-36.pyc660200644editdlrm
pipes.cpython-36.pyc78080644editdlrm
pkgutil.cpython-36.pyc162610644editdlrm
platform.cpython-36.pyc291970644editdlrm
plistlib.cpython-36.pyc280550644editdlrm
poplib.cpython-36.pyc133290644editdlrm
posixpath.cpython-36.pyc104560644editdlrm
pprint.cpython-36.pyc158240644editdlrm
profile.cpython-36.pyc139010644editdlrm
pstats.cpython-36.pyc218570644editdlrm
pty.cpython-36.pyc38610644editdlrm
pyclbr.cpython-36.pyc83650644editdlrm
pydoc.cpython-36.pyc837750644editdlrm
py_compile.cpython-36.pyc65440644editdlrm
queue.cpython-36.pyc87550644editdlrm
quopri.cpython-36.pyc57730644editdlrm
random.cpython-36.pyc193300644editdlrm
re.cpython-36.pyc140580644editdlrm
reprlib.cpython-36.pyc54000644editdlrm
rlcompleter.cpython-36.pyc57800644editdlrm
runpy.cpython-36.pyc79820644editdlrm
sched.cpython-36.pyc65640644editdlrm
secrets.cpython-36.pyc21620644editdlrm
selectors.cpython-36.pyc176970644editdlrm
shelve.cpython-36.pyc94580644editdlrm
shlex.cpython-36.pyc69700644editdlrm
shutil.cpython-36.pyc307040644editdlrm
signal.cpython-36.pyc25150644editdlrm
site.cpython-36.pyc165600644editdlrm
sitecustomize.cpython-36.pyc2120644editdlrm
smtpd.cpython-36.pyc266830644editdlrm
smtplib.cpython-36.pyc353400644editdlrm
sndhdr.cpython-36.pyc69130644editdlrm
socket.cpython-36.pyc220130644editdlrm
socketserver.cpython-36.pyc242500644editdlrm
sre_compile.cpython-36.pyc102780644editdlrm
sre_constants.cpython-36.pyc59720644editdlrm
sre_parse.cpython-36.pyc203580644editdlrm
ssl.cpython-36.pyc369390644editdlrm
stat.cpython-36.pyc38510644editdlrm
statistics.cpython-36.pyc181740644editdlrm
string.cpython-36.pyc79640644editdlrm
stringprep.cpython-36.pyc100300644editdlrm
struct.cpython-36.pyc3120644editdlrm
subprocess.cpython-36.pyc354850644editdlrm
sunau.cpython-36.pyc169380644editdlrm
symbol.cpython-36.pyc25170644editdlrm
symtable.cpython-36.pyc104280644editdlrm
sysconfig.cpython-36.pyc159160644editdlrm
tabnanny.cpython-36.pyc69750644editdlrm
tarfile.cpython-36.pyc630850644editdlrm
telnetlib.cpython-36.pyc180970644editdlrm
tempfile.cpython-36.pyc253090644editdlrm
textwrap.cpython-36.pyc136840644editdlrm
this.cpython-36.pyc12650644editdlrm
threading.cpython-36.pyc372340644editdlrm
timeit.cpython-36.pyc116030644editdlrm
token.cpython-36.pyc33200644editdlrm
tokenize.cpython-36.pyc186470644editdlrm
trace.cpython-36.pyc194950644editdlrm
traceback.cpython-36.pyc196460644editdlrm
tracemalloc.cpython-36.pyc172290644editdlrm
tty.cpython-36.pyc10720644editdlrm
turtle.cpython-36.pyc1317510644editdlrm
types.cpython-36.pyc82010644editdlrm
typing.cpython-36.pyc733060644editdlrm
uu.cpython-36.pyc34980644editdlrm
uuid.cpython-36.pyc209180644editdlrm
warnings.cpython-36.pyc132580644editdlrm
wave.cpython-36.pyc178850644editdlrm
weakref.cpython-36.pyc191430644editdlrm
webbrowser.cpython-36.pyc157970644editdlrm
xdrlib.cpython-36.pyc83020644editdlrm
zipapp.cpython-36.pyc55340644editdlrm
zipfile.cpython-36.pyc497280644editdlrm
_bootlocale.cpython-36.pyc9800644editdlrm
_collections_abc.cpython-36.pyc287970644editdlrm
_compat_pickle.cpython-36.pyc65660644editdlrm
_compression.cpython-36.pyc41040644editdlrm
_dummy_thread.cpython-36.pyc48510644editdlrm
_markupbase.cpython-36.pyc79910644editdlrm
_osx_support.cpython-36.pyc96840644editdlrm
_pydecimal.cpython-36.pyc1634020644editdlrm
_pyio.cpython-36.pyc713860644editdlrm
_sitebuiltins.cpython-36.pyc34350644editdlrm
_strptime.cpython-36.pyc159630644editdlrm
_sysconfigdata_m_linux_x86_64-linux-gnu.cpython-36.pyc187790644editdlrm
_threading_local.cpython-36.pyc64250644editdlrm
_weakrefset.cpython-36.pyc78280644editdlrm
__future__.cpython-36.pyc41670644editdlrm
__phello__.foo.cpython-36.pyc1190644editdlrm
Edit: /snap/core18/2979/usr/lib/python3.6/__pycache__/enum.cpython-36.pyc (23453B)
3 NqiF@s>ddlZddlmZmZddlmZddlmZyddl m Z Wn e k r`ddl m Z YnXdddd d d d gZ d dZddZddZddZeZGdd d ZGdddeZdZGdddeZGdddedZGdddeeZddZGdd d eZGdd d eeZd d!Zd"d Z d#d$Z!d%d&Z"dS)'N)MappingProxyTypeDynamicClassAttribute)reduce)or_) OrderedDictEnumMetaEnumIntEnumFlagIntFlagautouniquecCst|dpt|dpt|dS)z5Returns True if obj is a descriptor, False otherwise.__get____set__ __delete__)hasattr)objr/usr/lib/python3.6/enum.py_is_descriptors  rcCsT|dd|ddko"dknoR|dddkoR|dd dkoRt|dkS) z3Returns True if a __dunder__ name, False otherwise.N___r)len)namerrr _is_dunders(rcCsL|d|dkodknoJ|dddkoJ|dddkoJt|dkS)z1Returns True if a _sunder_ name, False otherwise.rrrrr!)r)rrrr _is_sunder$s r"cCsdd}||_d|_dS)z"Make the given class un-picklable.cSstd|dS)Nz%r cannot be pickled) TypeError)selfprotorrr_break_on_call_reduce-sz6_make_class_unpicklable.._break_on_call_reducez N) __reduce_ex__ __module__)clsr&rrr_make_class_unpicklable+sr*c@seZdZdZeZdS)r zP Instances are replaced with an appropriate value in Enum class suites. N)__name__r( __qualname____doc__ _auto_nullvaluerrrrr 3scs,eZdZdZfddZfddZZS) _EnumDictzTrack enum member order and ensure member names are not reused. EnumMeta will use the names found in self._member_names as the enumeration member names. cstjg|_g|_dS)N)super__init__ _member_names _last_values)r$) __class__rrr2As z_EnumDict.__init__cst|r.|d krtd|dkrt|d|nt|rD|dkrd}n||jkr\td|nxt|s||krtd |||ft|tr|j t kr|j |d t |j|j d d |_ |j }|jj||j j|tj||d S) zChanges anything not dundered or not a descriptor. If an enum member name is used twice, an error is raised; duplicate values are not checked for. Single underscore (sunder) names are reserved. _order__create_pseudo_member__generate_next_value_ _missing_z(_names_ are reserved for future Enum use_generate_next_value __order__zAttempted to reuse key: %rz%r already defined as: %rr N)r6r7r8r9)r" ValueErrorsetattrrr3r#r isinstancer r/r.r:rr4appendr1 __setitem__)r$keyr/)r5rrr@Fs,    "  z_EnumDict.__setitem__)r+r(r,r-r2r@ __classcell__rr)r5rr0:s r0cseZdZdZeddZfddZddZd)dddd d d d Zd dZ fddZ ddZ ddZ ddZ ddZddZeddZddZdd Zfd!d"Zdddd d d#d$Zed%d&Zed'd(ZZS)*rzMetaclass for EnumcCs0t}|j|\}}|dk r,t|dd|d<|S)Nr8)r0 _get_mixins_getattr)metaclsr)bases enum_dict member_type first_enumrrr __prepare__rs zEnumMeta.__prepare__c s|j|\}|j|\}}}fddjD}xjD] } | =q>Wjdd} t|dh@} | r~tdjdj| dkrdd<tj |||} g| _ t | _ | _ d d | jD} i| _d krtk rd}tfdd|Dst| x6jD]*}||}t|ts0|f}n|}tkrD|f}|sf|| }t|ds||_n6|| f|}t|dstkr||_n ||_|j}||_| |_|j|x8| j jD]\} }|j|jkr|}PqW| j j||| krt| |||| j |<y|| j|<Wntk r6YnXqWxPdD]H} t| | }t| d}t|| d}|dk rD||krDt| | |qDWtdk r|r|| _ tj | _ | dk rt| t!r| j"ddj#} | | j krtd| S)Ncsi|]}||qSrr).0k) classdictrr sz$EnumMeta.__new__..r6mrozInvalid enum member name: {0},r-zAn enumeration.cSs.h|]&}|jjD]\}}t|tr|qqSr)__dict__itemsr>r)rKcrLvrrr sz#EnumMeta.__new__..r'__getnewargs_ex____getnewargs__ __reduce__c3s|]}|jkVqdS)N)rQ)rKm)rHrr sz#EnumMeta.__new__.._value___repr____str__ __format__ z#member order does not match _order_)rVrWr'rX)r\r]r^r')$rC _find_new_r3popsetr<formatjoinr1__new___member_names_r _member_map_ _member_type_rO_value2member_map_objectanyr*r>tuplerr[_name_ __objclass__r2rRr?r=r#rDr__new_member__strreplacesplit)rEr)rFrMrIresave_newuse_args enum_membersrr6 invalid_names enum_classdynamic_attributesmethods member_namer/args enum_membercanonical_member class_method obj_method enum_method)r5)rMrHrre|s                          zEnumMeta.__new__cCsdS)z6 classes/types should always be True. Tr)r$rrr__bool__szEnumMeta.__bool__Nr )modulequalnametypestartcCs*|dkr|j||S|j||||||dS)aEither returns an existing member, or creates a new enum class. This method is used both when an enum class is given a value to match to an enumeration member (i.e. Color(3)) and for the functional API (i.e. Color = Enum('Color', names='RED GREEN BLUE')). When used for the functional API: `value` will be the name of the new class. `names` should be either a string of white-space/comma delimited names (values will start at `start`), or an iterator/mapping of name, value pairs. `module` should be set to the module this class is being created in; if it is not set, an attempt to find that module will be made, but if it fails the class will not be picklable. `qualname` should be set to the actual location this class can be found at in its module; by default it is set to the global scope. If this is not correct, unpickling will fail in some circumstances. `type`, if set, will be mixed in as the first base class. N)rrrr)re_create_)r)r/namesrrrrrrr__call__ s zEnumMeta.__call__cCst||o|j|jkS)N)r>rmrg)r)memberrrr __contains__)szEnumMeta.__contains__cs(||jkrtd|jtj|dS)Nz%s: cannot delete Enum member.)rgAttributeErrorr+r1 __delattr__)r)attr)r5rrr,s  zEnumMeta.__delattr__cCsddddg|jS)Nr5r- __members__r()rf)r$rrr__dir__4s zEnumMeta.__dir__c Cs>t|rt|y |j|Stk r8t|dYnXdS)a5Return the enum member matching `name` We use __getattr__ instead of descriptors or inserting into the enum class' __dict__ in order to support `name` and `value` being both properties for enum members (which live in the class' __dict__) and enum members themselves. N)rrrgKeyError)r)rrrr __getattr__8s  zEnumMeta.__getattr__cCs |j|S)N)rg)r)rrrr __getitem__HszEnumMeta.__getitem__csfddjDS)Nc3s|]}j|VqdS)N)rg)rKr)r)rrrZLsz$EnumMeta.__iter__..)rf)r)r)r)r__iter__KszEnumMeta.__iter__cCs t|jS)N)rrf)r)rrr__len__NszEnumMeta.__len__cCs t|jS)zReturns a mapping of member name->value. This mapping lists all enum members, including aliases. Note that this is a read-only view of the internal mapping. )rrg)r)rrrrQszEnumMeta.__members__cCs d|jS)Nz )r+)r)rrrr\[szEnumMeta.__repr__csfddtjDS)Nc3s|]}j|VqdS)N)rg)rKr)r)rrrZ_sz(EnumMeta.__reversed__..)reversedrf)r)r)r)r __reversed__^szEnumMeta.__reversed__cs0|jjdi}||krtdtj||dS)zBlock attempts to reassign Enum members. A simple assignment to the class namespace only changes one of the several possible ways to get an Enum member from the Enum class, resulting in an inconsistent Enumeration. rgzCannot reassign members.N)rQgetrr1 __setattr__)r)rr/ member_map)r5rrraszEnumMeta.__setattr__cCs|j}|dkr|fn||f}|j|\} } |j||} t|trP|jddj}t|ttfr|rt|dtr|g} }g} xDt | D]8\}}| j |||| dd}| j ||j ||fqWx6|D].}t|tr|||}}n|\}}|| |<qW|j |||| }|dkrTyt jdjd}Wn(ttfk rR}zWYdd}~XnX|dkrht|n||_|dk r~||_|S)aConvenience method to create a new Enum class. `names` can be: * A string containing member names, separated either with spaces or commas. Values are incremented by 1 from `start`. * An iterable of member names. Values are incremented by 1 from `start`. * An iterable of (member name, value) pairs. * A mapping of member name -> value pairs. NrPr_rrr+)r5rCrJr>rprqrrrllist enumerater8r?resys _getframe f_globalsrr<r*r(r,)r) class_namerrrrrrErFrrIrMoriginal_names last_valuescountrr/itemrz member_valuerwexcrrrrns<             zEnumMeta._create_cCs|s ttfSd}}x,|D]$}|tk rt|tr|jrtdqWt|tsTtdt|dtst|d}|d}n8x6|djD](}t|tr|dkr|}q|dkr|}qW||fS)zReturns the type for creating enum members, and the first inherited enum class. bases: the tuple of bases that was given to __new__ NzCannot extend enumerationszHnew enumerations must be created as `ClassName([mixin_type,] enum_type)`rr r!)rjr issubclassrfr#__mro__)rFrHrIbaserrrrCs(      zEnumMeta._get_mixins_c Cs|jdd}|dk }|dkrtxVdD]H}x8||fD],}t||d}|ddjtjtjhkr0|}Pq0W|dk r"Pq"Wtj}|tjkrd}nd}|||fS)a Returns the __new__ to be used for creating the enum members. classdict: the class dictionary given to __new__ member_type: the data type whose __new__ will be used by default first_enum: enumeration to check for an overriding __new__ reNroFT)rore)rrDrerjr) rMrHrIrersmethodpossibletargetrtrrrr`s(     zEnumMeta._find_new_)N)r+r(r,r- classmethodrJrerrrrrrrrrpropertyrr\rrr staticmethodrCr`rBrr)r5rrps(     5 -c@seZdZdZddZddZeddZdd Zd d Z d d Z ddZ ddZ ddZ eddZeddZedddZdS)rzRGeneric enumeration. Derive from this class to define new enumerations. c Csjt||kr|Sy||jkr&|j|SWn6tk r^x |jjD]}|j|krD|SqDWYnX|j|S)N)rrir#rgvaluesr[r9)r)r/rrrrres   z Enum.__new__c Cs8x2t|D]"}y|dStk r*Yq Xq W|SdS)Nr )rr#)rrrr last_valuerrrr8s  zEnum._generate_next_value_cCstd||jfdS)Nz%r is not a valid %s)r<r+)r)r/rrrr9"szEnum._missing_cCsd|jj|j|jfS)Nz <%s.%s: %r>)r5r+rmr[)r$rrrr\&sz Enum.__repr__cCsd|jj|jfS)Nz%s.%s)r5r+rm)r$rrrr]*sz Enum.__str__cs&fddjjD}dddg|S)Ncs2g|]*}|jD]}|ddkr|jkr|qqS)rr)rQrg)rKr)rY)r$rr /s z Enum.__dir__..r5r-r()r5rO)r$added_behaviorr)r$rr-s z Enum.__dir__cCs0|jtkrt}t|}n |j}|j}|j||S)N)rhrjrpr[r^)r$ format_specr)valrrrr^6s   zEnum.__format__cCs t|jS)N)hashrm)r$rrr__hash__Esz Enum.__hash__cCs|j|jffS)N)r5r[)r$r%rrrr'HszEnum.__reduce_ex__cCs|jS)zThe name of the Enum member.)rm)r$rrrrRsz Enum.namecCs|jS)zThe value of the Enum member.)r[)r$rrrr/Wsz Enum.valueNc sttj|}rtn|fddjD}y|jdddWn$tk rp|jdddYnX||||d}t|_|j|j |||<|S)z[ Create a new Enum subclass that replaces a collection of global constants cs g|]}|r||fqSrr)rKr)filtersourcerrrqsz!Enum._convert..cSs|d|dfS)Nr rr)trrrvszEnum._convert..)rAcSs|dS)Nrr)rrrrrys)r) varsrmoduleskeyssortr#_reduce_ex_by_namer'updater)r)rrrrmodule_globalsmembersr)rrr_convert\s     z Enum._convert)N)r+r(r,r-rer8rr9r\r]rr^rr'rrr/rrrrrrs    ) metaclassc@seZdZdZdS)r z.Enum where members are also (and must be) intsN)r+r(r,r-rrrrr scCs|jS)N)r)r$r%rrrrsrc@speZdZdZddZeddZeddZdd Zd d Z d d Z ddZ ddZ ddZ ddZddZdS)r zSupport for flagsc Csd|s|dk r|SdSxBt|D]6}yt|}PWqtk rRtd|dYqXqWd|dS)z Generate the next value when not given. name: the name of the member start: the initital start value or None count: the number of existing members last_value: the last value assigned or None Nr zInvalid Flag value: %rr)r _high_bit Exceptionr#)rrrrrhigh_bitrrrr8s zFlag._generate_next_value_cCs.|}|dkr|}|j|}|dkr*|}|S)Nr)r7)r)r/original_valuepossible_memberrrrr9s zFlag._missing_cCsb|jj|d}|dkr^t||\}}|r:td||jftj|}d|_||_|jj ||}|S)zL Create a composite member iff value contains only members. Nz%r is not a valid %s) rir _decomposer<r+rjrermr[ setdefault)r)r/ pseudo_memberr extra_flagsrrrr7s zFlag._create_pseudo_member_cCs"t||jstS|j|j@|jkS)N)r>r5NotImplementedr[)r$otherrrrrs zFlag.__contains__cCsV|j}|jdk r$d|j|j|jfSt||j\}}d|jdjdd|D|jfS)Nz <%s.%s: %r>|cSsg|]}t|jp|jqSr)rprmr[)rKrYrrrrsz!Flag.__repr__..)r5rmr+r[rrd)r$r)r uncoveredrrrr\s z Flag.__repr__cCs|j}|jdk r d|j|jfSt||j\}}t|dkr^|djdkr^d|j|djfSd|jdjdd|DfSdS)Nz%s.%sr rz%s.%rrcSsg|]}t|jp|jqSr)rprmr[)rKrYrrrrsz Flag.__str__..)r5rmr+rr[rrd)r$r)rrrrrr]s z Flag.__str__cCs t|jS)N)boolr[)r$rrrrsz Flag.__bool__cCs"t||jstS|j|j|jBS)N)r>r5rr[)r$rrrr__or__s z Flag.__or__cCs"t||jstS|j|j|j@S)N)r>r5rr[)r$rrrr__and__s z Flag.__and__cCs"t||jstS|j|j|jAS)N)r>r5rr[)r$rrrr__xor__s z Flag.__xor__csDtjj\}fddjD}tt|jd}j|S)Ncs&g|]}|kr|jj@ r|qSr)r[)rKrY)rr$rrrsz#Flag.__invert__..r)rr5r[r_or_)r$rinverted_membersinvertedr)rr$r __invert__szFlag.__invert__N)r+r(r,r-r8rr9r7rr\r]rrrrrrrrrr s   c@sTeZdZdZeddZeddZddZdd Zd d Z eZ eZ e Z d d Z dS)r zSupport for integer-based FlagscCs*t|tstd||jf|j|}|S)Nz%r is not a valid %s)r>intr<r+r7)r)r/ new_memberrrrr9s  zIntFlag._missing_cCs|jj|d}|dkr|g}t||\}}xL|rvt|}d|}||jkr\||kr\|j||| krld}q,||N}q,Wx6t|D]*}tj||}d|_||_ |jj ||}qW|S)Nrr) rirrrr?rrrermr[r)r)r/rneed_to_createrrbit flag_valuerrrr7s&     zIntFlag._create_pseudo_member_cCs0t||jtfstS|j|j|j|jB}|S)N)r>r5rrr[)r$rresultrrrrszIntFlag.__or__cCs,t||jtfstS|j|j|j|j@S)N)r>r5rrr[)r$rrrrr#szIntFlag.__and__cCs,t||jtfstS|j|j|j|jAS)N)r>r5rrr[)r$rrrrr(szIntFlag.__xor__cCs|j|j}|S)N)r5r[)r$rrrrr1szIntFlag.__invert__N)r+r(r,r-rr9r7rrr__ror____rand____rxor__rrrrrr s  cCs |jdS)z@returns index of highest bit, or -1 if value is zero or negativer ) bit_length)r/rrrr6srcCsbg}x0|jjD]"\}}||jkr|j||jfqW|r^djdd|D}td||f|S)z?Class decorator for enumerations ensuring unique member values.z, cSsg|]\}}d||fqS)z%s -> %sr)rKaliasrrrrrBszunique..z duplicate values found in %r: %s)rrRrr?rdr<) enumeration duplicatesrr alias_detailsrrrr :s  cCs|}|dk}|r*ddt|jjD}nddt|jjD}g}x4|D],\}}|rL||@|krL|j|||M}qLW| r||jkr|j|j||jddddt|d kr|dj|kr|jd||fS) z#Extract all members from the value.rcSs"g|]\}}|jdk r||fqS)N)r)rKrTrYrrrrRsz_decompose..cSs*g|]"\}}|jdk st|r||fqS)N)r _power_of_two)rKrTrYrrrrYscSs|jS)N)r[)rYrrrrdsz_decompose..T)rAreverser )rrirRr?rrr/ra)flagr/ not_coverednegativeflags_to_checkrrrrrrrGs$  rcCs|dkr dS|dt|kS)Nr Fr)r)r/rrrrjsr)#rtypesrr functoolsroperatorrr _collectionsr ImportError collections__all__rrr"r*rjr.r dictr0rrrrr rr r rr rrrrrrs@  3mA #