grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026o ®û|jéã@svdZddlZddlZdd„ejDƒZgd¢ZdZdZdd „Zd d „Z d d „Z ddd„Z Gdd„dƒZ Gdd„dƒZ dS)aAUtilities to compile possibly incomplete Python source code. This module provides two interfaces, broadly similar to the builtin function compile(), which take program text, a filename and a 'mode' and: - Return code object if the command is complete and valid - Return None if the command is incomplete - Raise SyntaxError, ValueError or OverflowError if the command is a syntax error (OverflowError and ValueError can be produced by malformed literals). The two interfaces are: compile_command(source, filename, symbol): Compiles a single command in the manner described above. CommandCompiler(): Instances of this class have __call__ methods identical in signature to compile_command; the difference is that if the instance compiles program text containing a __future__ statement, the instance 'remembers' and compiles all subsequent program texts with the statement in force. The module also provides another class: Compile(): Instances of this class act like the built-in function compile, but with 'memory' in the sense described above. éNcCsg|]}tt|ƒ‘qS©)ÚgetattrÚ __future__)Ú.0Zfnamerrú-/opt/alt/python310/lib64/python3.10/codeop.pyÚ &sÿr)Úcompile_commandÚCompileÚCommandCompilerii@cCs| d¡D]}| ¡}|r|ddkrnq|dkrd}t ¡�[t dttf¡z||||ƒWnBtysz||d||ƒWYWdƒdStyp}zdt|ƒvrfWYd}~YWdƒdSWYd}~nd}~wwYnwWdƒn1s~wY||||ƒS)NÚ rú#ÚevalÚpassÚignorezincomplete input) ÚsplitÚstripÚwarningsÚcatch_warningsÚ simplefilterÚ SyntaxWarningÚDeprecationWarningÚ SyntaxErrorÚstr)ÚcompilerÚsourceÚfilenameÚsymbolÚlineÚerrrÚ_maybe_compile1s8€  ù  ö €ÿû€ü rcCs4t|ƒ}t|ƒ}d|vrd|vrdS||krdSdS)Nzwas never closedFT)Úrepr)Zerr1Zerr2Zrep1Zrep2rrrÚ_is_syntax_errorLsr!cCst|||ttBƒS©N)ÚcompileÚPyCF_DONT_IMPLY_DEDENTÚPyCF_ALLOW_INCOMPLETE_INPUT©rrrrrrÚ_compileUsr'úÚsinglecCstt|||ƒS)a‰Compile a command and determine whether it is incomplete. Arguments: source -- the source string; may contain \n characters filename -- optional filename from which source was read; default "" symbol -- optional grammar start symbol; "single" (default), "exec" or "eval" Return value / exceptions raised: - Return a code object if the command is complete and valid - Return None if the command is incomplete - Raise SyntaxError, ValueError or OverflowError if the command is a syntax error (OverflowError and ValueError can be produced by malformed literals). )rr'r&rrrrXsrc@s eZdZdZdd„Zdd„ZdS)r zëInstances of this class behave much like the built-in compile function, but if one is used to compile text containing a future statement, it "remembers" and compiles all subsequent program texts with the statement in force.cCsttB|_dSr")r$r%Úflags©ÚselfrrrÚ__init__rszCompile.__init__cCs<t||||jdƒ}tD]}|j|j@r|j|jO_q |S)NT)r#r*Ú _featuresÚco_flagsZ compiler_flag)r,rrrZcodeobZfeaturerrrÚ__call__us  €zCompile.__call__N©Ú__name__Ú __module__Ú __qualname__Ú__doc__r-r0rrrrr ms r c@s"eZdZdZdd„Zd dd„ZdS) r a(Instances of this class have __call__ methods identical in signature to compile_command; the difference is that if the instance compiles program text containing a __future__ statement, the instance 'remembers' and compiles all subsequent program texts with the statement in force.cCs tƒ|_dSr")r rr+rrrr-ƒs zCommandCompiler.__init__r(r)cCst|j|||ƒS)aµCompile a command and determine whether it is incomplete. Arguments: source -- the source string; may contain \n characters filename -- optional filename from which source was read; default "" symbol -- optional grammar start symbol; "single" (default) or "eval" Return value / exceptions raised: - Return a code object if the command is complete and valid - Return None if the command is incomplete - Raise SyntaxError, ValueError or OverflowError if the command is a syntax error (OverflowError and ValueError can be produced by malformed literals). )rr)r,rrrrrrr0†szCommandCompiler.__call__N©r(r)r1rrrrr |sr r6)r5rrZall_feature_namesr.Ú__all__r$r%rr!r'rr r rrrrÚs"ÿ