/snap/core20/2866/usr/lib/python3.8/__pycache__
NameSizeModeActions
abc.cpython-38.pyc53340644editdlrm
aifc.cpython-38.pyc254740644editdlrm
antigravity.cpython-38.pyc7970644editdlrm
argparse.cpython-38.pyc625910644editdlrm
ast.cpython-38.pyc167630644editdlrm
asynchat.cpython-38.pyc68510644editdlrm
asyncore.cpython-38.pyc160280644editdlrm
base64.cpython-38.pyc170710644editdlrm
bdb.cpython-38.pyc249210644editdlrm
binhex.cpython-38.pyc121340644editdlrm
bisect.cpython-38.pyc23540644editdlrm
bz2.cpython-38.pyc114450644editdlrm
calendar.cpython-38.pyc270640644editdlrm
cgi.cpython-38.pyc265440644editdlrm
cgitb.cpython-38.pyc101500644editdlrm
chunk.cpython-38.pyc48390644editdlrm
cmd.cpython-38.pyc126260644editdlrm
code.cpython-38.pyc99130644editdlrm
codecs.cpython-38.pyc339560644editdlrm
codeop.cpython-38.pyc64170644editdlrm
colorsys.cpython-38.pyc32400644editdlrm
compileall.cpython-38.pyc94100644editdlrm
configparser.cpython-38.pyc457180644editdlrm
contextlib.cpython-38.pyc202290644editdlrm
contextvars.cpython-38.pyc2430644editdlrm
copy.cpython-38.pyc69870644editdlrm
copyreg.cpython-38.pyc43180644editdlrm
cProfile.cpython-38.pyc54800644editdlrm
crypt.cpython-38.pyc33870644editdlrm
csv.cpython-38.pyc119100644editdlrm
dataclasses.cpython-38.pyc236530644editdlrm
datetime.cpython-38.pyc571730644editdlrm
decimal.cpython-38.pyc3590644editdlrm
difflib.cpython-38.pyc594380644editdlrm
dis.cpython-38.pyc158080644editdlrm
doctest.cpython-38.pyc759740644editdlrm
dummy_threading.cpython-38.pyc11100644editdlrm
enum.cpython-38.pyc259620644editdlrm
filecmp.cpython-38.pyc84270644editdlrm
fileinput.cpython-38.pyc133730644editdlrm
fnmatch.cpython-38.pyc33550644editdlrm
formatter.cpython-38.pyc175450644editdlrm
fractions.cpython-38.pyc187390644editdlrm
ftplib.cpython-38.pyc280070644editdlrm
functools.cpython-38.pyc279010644editdlrm
genericpath.cpython-38.pyc40010644editdlrm
getopt.cpython-38.pyc62710644editdlrm
getpass.cpython-38.pyc41780644editdlrm
gettext.cpython-38.pyc180000644editdlrm
glob.cpython-38.pyc43430644editdlrm
gzip.cpython-38.pyc181840644editdlrm
hashlib.cpython-38.pyc67270644editdlrm
heapq.cpython-38.pyc140700644editdlrm
hmac.cpython-38.pyc63880644editdlrm
imaplib.cpython-38.pyc413420644editdlrm
imghdr.cpython-38.pyc41180644editdlrm
imp.cpython-38.pyc98090644editdlrm
inspect.cpython-38.pyc805930644editdlrm
io.cpython-38.pyc34540644editdlrm
ipaddress.cpython-38.pyc628290644editdlrm
keyword.cpython-38.pyc9980644editdlrm
linecache.cpython-38.pyc38670644editdlrm
locale.cpython-38.pyc346740644editdlrm
lzma.cpython-38.pyc120180644editdlrm
mailbox.cpython-38.pyc602640644editdlrm
mailcap.cpython-38.pyc72060644editdlrm
mimetypes.cpython-38.pyc160310644editdlrm
modulefinder.cpython-38.pyc161150644editdlrm
netrc.cpython-38.pyc37770644editdlrm
nntplib.cpython-38.pyc339740644editdlrm
ntpath.cpython-38.pyc140910644editdlrm
nturl2path.cpython-38.pyc17440644editdlrm
numbers.cpython-38.pyc122020644editdlrm
opcode.cpython-38.pyc54200644editdlrm
operator.cpython-38.pyc136910644editdlrm
optparse.cpython-38.pyc480570644editdlrm
os.cpython-38.pyc313970644editdlrm
pathlib.cpython-38.pyc442090644editdlrm
pdb.cpython-38.pyc472260644editdlrm
pickle.cpython-38.pyc469080644editdlrm
pickletools.cpython-38.pyc672040644editdlrm
pipes.cpython-38.pyc77950644editdlrm
pkgutil.cpython-38.pyc163090644editdlrm
platform.cpython-38.pyc243260644editdlrm
plistlib.cpython-38.pyc273740644editdlrm
poplib.cpython-38.pyc134590644editdlrm
posixpath.cpython-38.pyc104610644editdlrm
pprint.cpython-38.pyc162810644editdlrm
profile.cpython-38.pyc147580644editdlrm
pstats.cpython-38.pyc220660644editdlrm
pty.cpython-38.pyc39550644editdlrm
pyclbr.cpython-38.pyc104510644editdlrm
pydoc.cpython-38.pyc836460644editdlrm
py_compile.cpython-38.pyc73520644editdlrm
queue.cpython-38.pyc106260644editdlrm
quopri.cpython-38.pyc57480644editdlrm
random.cpython-38.pyc201080644editdlrm
re.cpython-38.pyc144220644editdlrm
reprlib.cpython-38.pyc53030644editdlrm
rlcompleter.cpython-38.pyc57550644editdlrm
runpy.cpython-38.pyc81810644editdlrm
sched.cpython-38.pyc65320644editdlrm
secrets.cpython-38.pyc21900644editdlrm
selectors.cpython-38.pyc169350644editdlrm
shelve.cpython-38.pyc94900644editdlrm
shlex.cpython-38.pyc75360644editdlrm
shutil.cpython-38.pyc372190644editdlrm
signal.cpython-38.pyc28430644editdlrm
site.cpython-38.pyc171680644editdlrm
sitecustomize.cpython-38.pyc2200644editdlrm
smtpd.cpython-38.pyc264630644editdlrm
smtplib.cpython-38.pyc355320644editdlrm
sndhdr.cpython-38.pyc69890644editdlrm
socket.cpython-38.pyc277870644editdlrm
socketserver.cpython-38.pyc253610644editdlrm
sre_compile.cpython-38.pyc151420644editdlrm
sre_constants.cpython-38.pyc63590644editdlrm
sre_parse.cpython-38.pyc216470644editdlrm
ssl.cpython-38.pyc450370644editdlrm
stat.cpython-38.pyc43720644editdlrm
statistics.cpython-38.pyc336530644editdlrm
string.cpython-38.pyc73000644editdlrm
stringprep.cpython-38.pyc110170644editdlrm
struct.cpython-38.pyc3300644editdlrm
subprocess.cpython-38.pyc419670644editdlrm
sunau.cpython-38.pyc170800644editdlrm
symbol.cpython-38.pyc24040644editdlrm
symtable.cpython-38.pyc113220644editdlrm
sysconfig.cpython-38.pyc158370644editdlrm
tabnanny.cpython-38.pyc70300644editdlrm
tarfile.cpython-38.pyc630430644editdlrm
telnetlib.cpython-38.pyc182370644editdlrm
tempfile.cpython-38.pyc266530644editdlrm
textwrap.cpython-38.pyc135190644editdlrm
this.cpython-38.pyc12610644editdlrm
threading.cpython-38.pyc399760644editdlrm
timeit.cpython-38.pyc117770644editdlrm
token.cpython-38.pyc24850644editdlrm
tokenize.cpython-38.pyc171600644editdlrm
trace.cpython-38.pyc200260644editdlrm
traceback.cpython-38.pyc199380644editdlrm
tracemalloc.cpython-38.pyc173630644editdlrm
tty.cpython-38.pyc10760644editdlrm
turtle.cpython-38.pyc1300220644editdlrm
types.cpython-38.pyc91770644editdlrm
typing.cpython-38.pyc624200644editdlrm
uu.cpython-38.pyc36050644editdlrm
uuid.cpython-38.pyc236830644editdlrm
warnings.cpython-38.pyc136520644editdlrm
wave.cpython-38.pyc181490644editdlrm
weakref.cpython-38.pyc195180644editdlrm
webbrowser.cpython-38.pyc171200644editdlrm
xdrlib.cpython-38.pyc82210644editdlrm
zipapp.cpython-38.pyc58540644editdlrm
zipfile.cpython-38.pyc593360644editdlrm
zipimport.cpython-38.pyc172750644editdlrm
_bootlocale.cpython-38.pyc12430644editdlrm
_collections_abc.cpython-38.pyc287410644editdlrm
_compat_pickle.cpython-38.pyc55010644editdlrm
_compression.cpython-38.pyc41460644editdlrm
_dummy_thread.cpython-38.pyc60370644editdlrm
_markupbase.cpython-38.pyc77900644editdlrm
_osx_support.cpython-38.pyc115930644editdlrm
_pydecimal.cpython-38.pyc1607350644editdlrm
_pyio.cpython-38.pyc740790644editdlrm
_py_abc.cpython-38.pyc46700644editdlrm
_sitebuiltins.cpython-38.pyc34810644editdlrm
_strptime.cpython-38.pyc160440644editdlrm
_sysconfigdata__linux_x86_64-linux-gnu.cpython-38.pyc211210644editdlrm
_sysconfigdata__x86_64-linux-gnu.cpython-38.pyc211150644editdlrm
_threading_local.cpython-38.pyc64460644editdlrm
_weakrefset.cpython-38.pyc76000644editdlrm
__future__.cpython-38.pyc41580644editdlrm
__phello__.foo.cpython-38.pyc1270644editdlrm
Edit: /snap/core20/2866/usr/lib/python3.8/__pycache__/ast.cpython-38.pyc (16763B)
U ʦi"K@sdZddlTd=ddddd Zd d Zd>d dZddZddZd?ddZddZddZ d@ddZ ddZ ddZ dd d!d"Z d#d$ZGd%d&d&eZGd'd(d(eZd)d*Zd+d,Zeeee_eeee_Gd-d.d.eZd/d0ZGd1d2d2eed3ZGd4d5d5eed3ZGd6d7d7eed3ZGd8d9d9eed3ZGd:d;d;eed3Zee e!e"fee#fee$feede%feed<fiZ&ee%fiZ'e%d9edd9e d2e!d2e"d2e#d5e$d7ed<d;iZ(dS)AaH ast ~~~ The `ast` module helps Python applications to process trees of the Python abstract syntax grammar. The abstract syntax itself might change with each Python release; this module helps to find out programmatically what the current grammar looks like and allows modifications of it. An abstract syntax tree can be generated by passing `ast.PyCF_ONLY_AST` as a flag to the `compile()` builtin function or by using the `parse()` function from this module. The result will be a tree of objects whose classes all inherit from `ast.AST`. A modified abstract syntax tree can be compiled into a Python code object using the built-in `compile()` function. Additionally various helper functions are provided that make working with the trees simpler. The main intention of the helper functions and this module in general is to provide an easy to use interface for libraries that work tightly with the python syntax (template engines for example). :copyright: Copyright 2008 by Armin Ronacher. :license: Python License. )* execFN) type_commentsfeature_versioncCsRt}|r|tO}t|tr4|\}}|dks.t|}n |dkr@d}t|||||dS)z Parse the source into an AST node. Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). Pass type_comments=True to get back type comments where the syntax allows. N)_feature_version)Z PyCF_ONLY_ASTZPyCF_TYPE_COMMENTS isinstancetupleAssertionErrorcompile)sourcefilenamemoderrflagsmajorminorr/usr/lib/python3.8/ast.pyparses   rcs`t|trt|dd}t|tr&|j}ddfddfddfd d |S) a Safely evaluate an expression node or a string containing a Python expression. The string or node provided may only consist of the following Python literal structures: strings, bytes, numbers, tuples, lists, dicts, sets, booleans, and None. eval)rcSstd|dS)Nzmalformed node or string: ) ValueErrornoderrr_raise_malformed_node>sz+literal_eval.._raise_malformed_nodecs,t|trt|jtttfkr&||jSN)r Constanttypevalueintfloatcomplexr)rrr _convert_num@sz"literal_eval.._convert_numcsDt|tr._convert_signed_numcst|tr|jSt|tr*tt|jSt|trDtt|jSt|t r^t t|jSt|t rt |j t |jkr|ttt|j t|jSt|trt|jttfr|j}|j}t|ttfrt|trt|jtr||S||S|Sr)r rrZTupler mapZeltsZListlistSetsetZDictlenkeysvaluesdictzipZBinOpr$ZAddZSubleftrightr r!r")rr0r1_convertr#r&rrrr3Ls,        zliteral_eval.._convert)r strrZ Expressionbody)Znode_or_stringrr2r literal_eval3s     r6Tcs2fddt|ts*td|jj|S)a Return a formatted dump of the tree in node. This is mainly useful for debugging purposes. If annotate_fields is true (by default), the returned string will show the names and the values for fields. If annotate_fields is false, the result string will be more compact by omitting unambiguous field names. Attributes such as line numbers and column offsets are not dumped by default. If this is wanted, include_attributes can be set to true. c st|trg}}|jD]V}zt||}Wntk rBd}YqX|r`|d||fq||qr|jr|jD]:}z |d|t||fWqtk rYqXqd|jjd |fSt|t rdd fdd|DSt |S)NTz%s=%sz%s(%s)z, z[%s]c3s|]}|VqdSrr).0x)_formatrr sz(dump.._format..) r AST_fieldsgetattrAttributeErrorappend _attributes __class____name__joinr(repr)rargskeywordsfieldrar9annotate_fieldsinclude_attributesrrr9ps*       zdump.._formatzexpected AST, got %r)r r; TypeErrorrArB)rrJrKrrIrdumpfs  rMcCsVdD]L}||jkr||jkrt||d}|dk sDt||r|drt|||q|S)z Copy source location (`lineno`, `col_offset`, `end_lineno`, and `end_col_offset` attributes) from *old_node* to *new_node* if possible, and return *new_node*. )lineno col_offset end_linenoend_col_offsetNZend_)r@r=hasattr startswithsetattr)new_nodeZold_nodeattrrrrr copy_locations rWcs fdd|dddd|S)a{ When you compile a node tree with compile(), the compiler expects lineno and col_offset attributes for every node that supports them. This is rather tedious to fill in for generated nodes, so this helper adds these attributes recursively where not already set, by setting them to the values of the parent node. It works recursively starting at *node*. csd|jkr"t|ds||_n|j}d|jkrDt|ds>||_n|j}d|jkrft|ds`||_n|j}d|jkrt|ds||_n|j}t|D]}|||||qdS)NrNrPrOrQ)r@rRrNrPrOrQiter_child_nodes)rrNrOrPrQchild_fixrrr[s$         z#fix_missing_locations.._fixrrrrrZrfix_missing_locationss r]r\cCsVt|D]H}d|jkr(t|dd||_d|jkrt|dd}dk r|||_q|S)z Increment the line number and end line number of each node in the tree starting at *node* by *n*. This is useful to "move code" to a different location in a file. rNrrPN)walkr@r=rNrP)rnrYrPrrrincrement_linenos   r`c cs:|jD].}z|t||fVWqtk r2YqXqdS)zs Yield a tuple of ``(fieldname, value)`` for each field in ``node._fields`` that is present on *node*. N)r<r=r>)rrGrrr iter_fieldss  raccsLt|D]>\}}t|tr"|Vqt|tr|D]}t|tr0|Vq0qdS)z Yield all direct child nodes of *node*, that is, all fields that are nodes and all items of fields that are lists of nodes. N)rar r;r()rnamerGitemrrrrXs   rXcCst|ttttfs"td|jj|jr8t|jdt sroencodedecoderrinsertr?rC) rrrsrNrPrOrQrmZpaddingfirstZlastrrrget_source_segment*s&      rxccs<ddlm}||g}|r8|}|t||VqdS)z Recursively yield all descendant nodes in the tree starting at *node* (including *node* itself), in no specified order. This is useful if you only want to modify nodes in place and don't care about the context. r)dequeN) collectionsrypopleftextendrX)rryZtodorrrr^Ms   r^c@s(eZdZdZddZddZddZdS) NodeVisitora< A node visitor base class that walks the abstract syntax tree and calls a visitor function for every node found. This function may return a value which is forwarded by the `visit` method. This class is meant to be subclassed, with the subclass adding visitor methods. Per default the visitor functions for the nodes are ``'visit_'`` + class name of the node. So a `TryFinally` node visit function would be `visit_TryFinally`. This behavior can be changed by overriding the `visit` method. If no visitor function exists for a node (return value `None`) the `generic_visit` visitor is used instead. Don't use the `NodeVisitor` if you want to apply changes to nodes during traversing. For this a special visitor exists (`NodeTransformer`) that allows modifications. cCs"d|jj}t|||j}||S)z Visit a node.visit_)rArBr= generic_visit)selfrmethodvisitorrrrvisitos zNodeVisitor.visitcCsTt|D]F\}}t|tr:|D]}t|tr||qqt|tr||qdS)z9Called if no explicit visitor function exists for a node.N)rar r(r;r)rrrGrrcrrrrus   zNodeVisitor.generic_visitc Cs|j}tt|}|dkr@tD]\}}t||r$|}q@q$|dk rd|}zt||}Wntk rrYn&Xddl}| |dt d||S| |S)Nr~rz" is deprecated; add visit_Constant) r_const_node_type_namesgetritemsr r=r>warningswarnPendingDeprecationWarningr) rrrZ type_nameclsrbrrrrrrvisit_Constants(  zNodeVisitor.visit_ConstantN)rB __module__ __qualname____doc__rrrrrrrr}[s r}c@seZdZdZddZdS)NodeTransformeraG A :class:`NodeVisitor` subclass that walks the abstract syntax tree and allows modification of nodes. The `NodeTransformer` will walk the AST and use the return value of the visitor methods to replace or remove the old node. If the return value of the visitor method is ``None``, the node will be removed from its location, otherwise it is replaced with the return value. The return value may be the original node in which case no replacement takes place. Here is an example transformer that rewrites all occurrences of name lookups (``foo``) to ``data['foo']``:: class RewriteName(NodeTransformer): def visit_Name(self, node): return Subscript( value=Name(id='data', ctx=Load()), slice=Index(value=Str(s=node.id)), ctx=node.ctx ) Keep in mind that if the node you're operating on has child nodes you must either transform the child nodes yourself or call the :meth:`generic_visit` method for the node first. For nodes that were part of a collection of statements (that applies to all statement nodes), the visitor may also return a list of nodes rather than just a single node. Usually you use the transformer like this:: node = YourTransformer().visit(node) cCst|D]\}}t|trvg}|D]D}t|tr\||}|dkrFq"nt|ts\||q"||q"||dd<qt|tr||}|dkrt||qt|||q|Sr) rar r(r;rr|r?delattrrT)rrrG old_valueZ new_valuesrrUrrrrs&         zNodeTransformer.generic_visitN)rBrrrrrrrrrs#rcCs|jSrr)rrrr_gettersrcCs ||_dSrr)rrrrr_settersrc@seZdZddZdS)_ABCcCsft|tsdS|tkrZz |j}Wntk r6YdSXt|t|oXt|t|d St||S)NFr) r r _const_typesrr>_const_types_notrr__instancecheck__)rinstrrrrrs  z_ABC.__instancecheck__N)rBrrrrrrrrsrcOsf|D]<}||jkrq|j|}|t|krt|jd|q|tkrTt||Stj|f||S)Nz" got multiple values for argument )r<indexr+rLrBrr__new__)rrEkwargskeyposrrr_news    rc@seZdZdZeZdS)Num)r_NrBrrr<rrrrrrrsr) metaclassc@seZdZdZeZdS)rdreNrrrrrrdsrdc@seZdZdZeZdS)BytesrNrrrrrrsrc@seZdZeZdS) NameConstantN)rBrrrrrrrrrsrc@seZdZdZddZdS)EllipsisrcOs(|tkrtd||Stj|f||S)N.).)rrr)rrErrrrr szEllipsis.__new__N)rBrrr<rrrrrrsr.)rr)TF)r\)T))r_astrr6rMrWr]r`rarXrhrorrrxr^objectr}rrrpropertyrr_rerrrrrdrrrr r!r"r4bytesboolrrrrrrrsz 3 '#    #:>