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.

classification
Title: saxutils defines an inner class where a normal one would do
Type: Stage: resolved
Components: Library (Lib) Versions: Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: rhettinger Nosy List: alex, christian.heimes, eric.smith, python-dev, rhettinger, serhiy.storchaka
Priority: normal Keywords: needs review, patch

Created on 2014-07-16 14:28 by alex, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
sax.diff alex, 2014-07-16 14:28 review
Messages (4)
msg223209 - (view) Author: Alex Gaynor (alex) * (Python committer) Date: 2014-07-16 14:28
This makes things slower than they need to be (yes, even on CPython :-)), and is slightly confusing since usually inner classes are only used when a closure is needed.

Attached patch simply moves the class definition.
msg223779 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2014-07-23 21:15
Looks fine to me. Normally I'd define the class being returned before the function returning it, but it doesn't really make a difference.
msg223808 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2014-07-24 05:17
LGTM. But it would be better to add underscore prefix to class name.
msg223973 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-07-25 17:26
New changeset a5cb10f2dbaa by Raymond Hettinger in branch '2.7':
Issue #21990:  Cleanup unnecessary inner class definition in saxutils.
http://hg.python.org/cpython/rev/a5cb10f2dbaa
History
Date User Action Args
2022-04-11 14:58:06adminsetgithub: 66189
2014-07-27 16:34:05berker.peksagsetstage: commit review -> resolved
2014-07-25 18:30:47rhettingersetstatus: open -> closed
resolution: fixed
2014-07-25 17:26:44python-devsetnosy: + python-dev
messages: + msg223973
2014-07-25 17:14:00rhettingersetassignee: rhettinger

nosy: + rhettinger
2014-07-24 05:17:25serhiy.storchakasetnosy: + serhiy.storchaka

messages: + msg223808
stage: commit review
2014-07-23 21:15:21eric.smithsetnosy: + eric.smith
messages: + msg223779
2014-07-16 17:45:17alexsetkeywords: + needs review
2014-07-16 17:44:40ned.deilysetnosy: + christian.heimes
2014-07-16 14:28:48alexcreate