[issue37968] The turtle
Nick Timkovich added the comment: Regarding #1: In Python, you may refer to a variable's name (e.g. `rt`, which is a function), which often has no effect in a script. In the REPL (where you see >>>) it is useful to inspect the object: >>> turtle.rt In order to call that name/function, parentheses are *required* unlike other languages where they are optional (Ruby). So, you don't get an error message, but one is not expected. Linting tools can alert you to statements that don't appear to have an effect. Regarding #2: Students of the turtle could create a reusable function to draw a circle with the turtle and return to the starting position. It would be an excellent exercise with multiple solutions! -- nosy: +nicktimko ___ Python tracker <https://bugs.python.org/issue37968> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37968] The turtle
Nick Timkovich added the comment: Resolving #1 as you suggest is next to impossible. Python can not deduce if you meant to call the function or just refer to its name. Admittedly, the latter is strange in non-interactive contexts, but it is valid. #2, as far as I can tell Logo had an ARC command: ARC angle radius draws an arc of a circle, with the turtle at the center, with the specified radius, starting at the turtle's heading and extending clockwise through the specified angle. The turtle does not move. I guess I don't know the history about why there's turtle.circle in Python which *does* move the turtle, and has the center *not* at the turtle. Adding an equivalent "turtle.arc" function might be useful, though the naming would be a bit confusing. Can you propose a better name and define exactly how it would work? -- ___ Python tracker <https://bugs.python.org/issue37968> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37969] urllib.parse functions reporting false equivalent URIs
Nick Timkovich added the comment: Looking at the history, the line in the docs used to say > ... (for example, an empty query (the draft states that these are equivalent). which was changed to "the RFC" in April 2006 https://github.com/python/cpython/commit/ad5177cf8da#diff-5b4cef771c997754f9e2feeae11d3b1eL68-R95 The original language was added in February 1995 https://github.com/python/cpython/commit/a12ef9433baf#diff-5b4cef771c997754f9e2feeae11d3b1eR48-R51 So "the draft" probably meant the draft of RFC-1738 https://tools.ietf.org/html/rfc1738#section-3.3 which is kinda vague on it. It didn't help that rewording it as "the RFC" later when there are 3+ RFCs referenced in the lib docs, one of which obsoleted the another RFC and definitely changed the meaning of the loose "?". The draft of 2396 always seemed to have the opposite wording you point out, at least back in draft 07 (September 2004): https://tools.ietf.org/html/draft-fielding-uri-rfc2396bis-07#section-6.2.3 The draft 06 (April 2004) was silent on the matter https://tools.ietf.org/html/draft-fielding-uri-rfc2396bis-06#section-6.2.3 -- nosy: +nicktimko ___ Python tracker <https://bugs.python.org/issue37969> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37968] Add a turtle module function to draw a circle centered at the turtle
Nick Timkovich added the comment: To clarify, there is an "ARC" command in Logo that draws a circle/circle segment *centered on* the turtle. Reference: http://fmslogo.sourceforge.net/manual/command-arc.html Examples: https://personal.utdallas.edu/~veerasam/logo/ That command is not/has not been implemented in Python's turtle graphics. As Eric mentioned, it could be considered a benefit as the principle of turtle graphics is that turtles have no arms to move the pen away from their body (adolescent abnormal assassin turtles, notwithstanding). -- ___ Python tracker <https://bugs.python.org/issue37968> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38046] JSON sorting type error
Nick Timkovich added the comment: It's not clear what you suggest, but it is likely better to alert the user that their keys have mismatched types than to suppress it by default. Perhaps alongside the `sort_keys` argument, you would like a parameter that gets passed into `sorted()` when the items are sorted? Perhaps an additional argument, or if sort_keys is a callable, use that as the `key` argument to sorted? ``` strange = {"1":"one", 2:"ii"} json.dumps(strange, sort_keys=True, key=str) json.dumps(strange, sort_keys=str) # {"1": "one", 2: "ii"} ``` -- nosy: +nicktimko ___ Python tracker <https://bugs.python.org/issue38046> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38046] Can't use sort_keys in json.dumps with mismatched types
Change by Nick Timkovich : -- components: +Library (Lib) title: JSON sorting type error -> Can't use sort_keys in json.dumps with mismatched types versions: +Python 3.9 -Python 3.7 ___ Python tracker <https://bugs.python.org/issue38046> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38438] argparse "usage" overly-complex with nargs="*"
Nick Timkovich added the comment: The `[arg [arg ...]]` feels a bit more formal to me, and I might prefer it in the example shown where the arg name is fairly short. That said, `man mv` shows something like: mv [OPTION]... [-T] SOURCE DEST mv [OPTION]... SOURCE... DIRECTORY mv [OPTION]... -t DIRECTORY SOURCE... -- nosy: +nicktimko ___ Python tracker <https://bugs.python.org/issue38438> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26834] Add truncated SHA512/224 and SHA512/256
Nick Timkovich added the comment: Was this patch mostly ready to go? The additional SHA512 variants are appealing because they run ~40% faster than SHA256 on 64-bit hardware for longer messages. -- nosy: +nicktimko ___ Python tracker <https://bugs.python.org/issue26834> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20693] Sidebar scrolls down 2x as fast as page content
New submission from Nick Timkovich: When scrolling down in the Python 3.4 docs (e.g. http://docs.python.org/3.4/library/index.html ) the Sphinx sidebar's top value increases twice as fast as the user moves down the page, resulting in it "running away". I don't know sufficient JS to identify the problem, but I'm guessing it's somewhere in the sidebar.js:scroll_sidebar() function or whatever might configure it. (apologies, I *think* I may have sent a similar mail to the docs list already) -- assignee: docs@python components: Documentation files: py34sidebar.png messages: 211675 nosy: docs@python, nicktimko priority: normal severity: normal status: open title: Sidebar scrolls down 2x as fast as page content type: behavior versions: Python 3.4 Added file: http://bugs.python.org/file34149/py34sidebar.png ___ Python tracker <http://bugs.python.org/issue20693> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20820] HTML being escaped on some release pages
New submission from Nick Timkovich: On a random trip through Python's past I noticed the new site is escaping HTML on some older version release notes: * http://www.python.org/download/releases/1.6/ * http://www.python.org/download/releases/2.0/ * http://www.python.org/download/releases/2.1/ * http://www.python.org/download/releases/2.1.[1-3]/ (2.1.1, 2.1.2, 2.1.3) * http://www.python.org/download/releases/2.2/ * http://www.python.org/download/releases/2.2.[1-2]/ * http://www.python.org/download/releases/2.3/ * http://www.python.org/download/releases/2.3.[1-5]/ I was pointed here from the pydotorg-www list, but None of the components seem to fit with website maintenance. -- messages: 212531 nosy: nicktimko priority: normal severity: normal status: open title: HTML being escaped on some release pages type: behavior ___ Python tracker <http://bugs.python.org/issue20820> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue27337] 3.6.0a2 tarball has weird paths
Nick Timkovich added the comment: In pyenv this was "fixed" by pointing to the .tar.xz archive instead of the .tgz https://github.com/yyuu/pyenv/pull/652, maybe you could implement that for Pythonz? -- nosy: +nicktimko -ned.deily, petere ___ Python tracker <http://bugs.python.org/issue27337> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com