Re: REPL with multiple function definitions

2022-06-26 Thread Roel Schroeven
Rob Cliffe via Python-list schreef op 27/06/2022 om 0:14: This 2-line program def f(): pass def g(): pass runs silently (no Exception).  But: 23:07:02 c:\>python Python 3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:20:19) [MSC v.1925 32 bit (Intel)] on win32 Type "help", "copyright", "credits"

Re: REPL with multiple function definitions

2022-06-26 Thread Chris Angelico
On Mon, 27 Jun 2022 at 08:15, Rob Cliffe via Python-list wrote: > > This 2-line program > > def f(): pass > def g(): pass > > runs silently (no Exception). But: > > 23:07:02 c:\>python > Python 3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:20:19) [MSC v.1925 32 > bit (Intel)] on win32 > Type

REPL with multiple function definitions

2022-06-26 Thread Rob Cliffe via Python-list
This 2-line program def f(): pass def g(): pass runs silently (no Exception).  But: 23:07:02 c:\>python Python 3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:20:19) [MSC v.1925 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> def f(): pass ...

Re: why this code giving recursion error????

2022-06-26 Thread dn
On 26/06/2022 23.00, נתי שטרן wrote: > I FIXED THE CODE  For the benefit of future-readers: how did you go about fixing it? What was wrong? -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: why this code giving recursion error????

2022-06-26 Thread נתי שטרן
I FIXED THE CODE ‫בתאריך יום א׳, 26 ביוני 2022 ב-13:57 מאת ‪dn‬‏ <‪ pythonl...@danceswithmice.info‬‏>:‬ > On 26/06/2022 22.48, נתי שטרן wrote: > > def compile(p, flags=0): > > # internal: convert pattern list to internal format > > > > if (isinstance(p,str)): > >

Re: why this code giving recursion error????

2022-06-26 Thread נתי שטרן
and i ask also what's the problem with this function: def _code(p, flags): flags = p.state.flags | flags code = [] # compile info block sre_compile._compile_info(code, p, flags) # compile the pattern sre_compile._compile(code, p.data, flags)

Re: why this code giving recursion error????

2022-06-26 Thread dn
On 26/06/2022 22.48, נתי שטרן wrote: > def compile(p, flags=0): > # internal: convert pattern list to internal format > > if (isinstance(p,str)): > pattern = p > p = sre_parse.parse(p, flags) > else: > pattern = None > > code =

Re: why this code giving recursion error????

2022-06-26 Thread נתי שטרן
stack trace: File "\\Weank-fs\users$\NetanelST\ORACLE\RTR.py", line 5387, in class bottle: File "\\Weank-fs\users$\NetanelST\ORACLE\RTR.py", line 5694, in bottle class Router(object): File "\\Weank-fs\users$\NetanelST\ORACLE\RTR.py", line 5736, in Router rule_syntax =

why this code giving recursion error????

2022-06-26 Thread נתי שטרן
def compile(p, flags=0): # internal: convert pattern list to internal format if (isinstance(p,str)): pattern = p p = sre_parse.parse(p, flags) else: pattern = None code = _code(p, flags) if flags & SRE_FLAG_DEBUG: