Issue 10193: Simplify instrospection used by turtle module (original) (raw)

Issue10193

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.

This issue has been migrated to GitHub: https://github.com/python/cpython/issues/54402

classification

Title: Simplify instrospection used by turtle module
Type: Stage: resolved
Components: Library (Lib) Versions: Python 3.2

process

Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: belopolsky Nosy List: belopolsky, eric.araujo
Priority: normal Keywords: patch

Created on 2010-10-25 18:48 by belopolsky, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
turtle-inspect.diff belopolsky,2010-10-25 18:48
Messages (3)
msg119569 - (view) Author: Alexander Belopolsky (belopolsky) * (Python committer) Date: 2010-10-25 18:48
The turtle module uses introspection in order to generate module level functions. Attached patch streamlines the introspection code by using inspect module function instead of direct access to cod object attributes.
msg119700 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-10-27 12:10
+1. This is a small but nice improvement for the added readability and foremost for the removal of obscure code (testing for varargs is easier to understand than “if co_flags & 0x4”). (“"=%r" % (name,)” reminds me I never remember to protect my RHS with %-formatting, good job :) I wonder about the name “name”, since we’re looping other default values here.)
msg119710 - (view) Author: Alexander Belopolsky (belopolsky) * (Python committer) Date: 2010-10-27 13:26
On Wed, Oct 27, 2010 at 8:10 AM, Éric Araujo <report@bugs.python.org> wrote: .. > I wonder about the name “name”, since we’re looping other default values here.) Good point. I changed that and committed in revision 85857.
History
Date User Action Args
2022-04-11 14:57:07 admin set github: 54402
2010-10-27 13:27:08 belopolsky set status: open -> closedstage: commit review -> resolved
2010-10-27 13:26:45 belopolsky set messages: +
2010-10-27 12:10:28 eric.araujo set nosy: + eric.araujomessages: +
2010-10-26 16:32:25 belopolsky set assignee: belopolskyresolution: acceptedstage: commit review
2010-10-25 18:48:45 belopolsky create