This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients cheryl.sabella, terry.reedy
Date 2018-02-20.21:46:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1519163201.56.0.467229070634.issue32874@psf.upfronthosting.co.za>
In-reply-to
Content
Respone to msg312353: Yes, let us restrict this to testing pyparse code as is.  I opened issue #32880 for changing the code.  My followup post discusses parse variable initialization.

Putting instance variable defaults in class attributes is a known practice.  But this is usually done when the 'default' is the most common value, not when the class attribute is always masked, before access, by an instance attribute of the same name.

One could claim that it is buggy to not create a new Parser instance for each subtest.  But the class appears to be designed for instance reuse, by having a separate set string method and by never looking at string-specific attributes until set from the string.

We could instead say that the bug is the test checking an undefined value. I rejected the option of not looking when test.lastopenbracketpos is None and instead suggest on the new issue that this instance attribute always be freshly set, like all the others.
History
Date User Action Args
2018-02-20 21:46:41terry.reedysetrecipients: + terry.reedy, cheryl.sabella
2018-02-20 21:46:41terry.reedysetmessageid: <1519163201.56.0.467229070634.issue32874@psf.upfronthosting.co.za>
2018-02-20 21:46:41terry.reedylinkissue32874 messages
2018-02-20 21:46:41terry.reedycreate