New submission from Muhamed Itani :
I have an MPYFrame class that inherits from tkinter.Frame. It's init looks like
this:
from os.path import normcase,normpath
def
__init__(self,master=None,port=None,baudrate=115200,timeout=1,localFolder=normcase(normpath(os.getcwd(:
The problem is, when I check/access the value of localFolder later in the code
(even directly as a first statement within __init__), it is obvious that
os.getcwd() is executing, but normcase and/or normpath are not. The resulting
path contains capital letters (tested on Windows 11), even though it should
not. If I run:
localFolder=normcase(normpath(localFolder))
as a first statement after init, then check the value of localFolder (for
example at a debugging breakpoint), it correctly then contains a normalized
path in which all letters have been converted to lowercase (but only after the
statement itself has executed).
--
components: Parser
files: mpyFrame.pyw
messages: 406765
nosy: lys.nikolaou, moefear85, pablogsal
priority: normal
severity: normal
status: open
title: kwarg default value expression incorrectly evaluated
type: behavior
versions: Python 3.10
Added file: https://bugs.python.org/file50456/mpyFrame.pyw
___
Python tracker
<https://bugs.python.org/issue45867>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com