[issue38438] argparse "usage" overly-complex with nargs="*"

2019-10-11 Thread Nick Timkovich
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

[issue38046] Can't use sort_keys in json.dumps with mismatched types

2019-09-06 Thread Nick Timkovich
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/issu

[issue38046] JSON sorting type error

2019-09-06 Thread Nick Timkovich
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

[issue37968] Add a turtle module function to draw a circle centered at the turtle

2019-08-29 Thread Nick Timkovich
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

[issue37969] urllib.parse functions reporting false equivalent URIs

2019-08-28 Thread Nick Timkovich
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/ad5

[issue37968] The turtle

2019-08-28 Thread Nick Timkovich
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

[issue37968] The turtle

2019-08-28 Thread Nick Timkovich
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

[issue26834] Add truncated SHA512/224 and SHA512/256

2018-05-02 Thread Nick Timkovich
Nick Timkovich <prometheus...@gmail.com> 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: +nic

[issue27337] 3.6.0a2 tarball has weird paths

2016-07-01 Thread Nick Timkovich
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

[issue20820] HTML being escaped on some release pages

2014-03-01 Thread Nick Timkovich
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

Re: Tuples and immutability

2014-02-27 Thread Nick Timkovich
On Thu, Feb 27, 2014 at 10:33 AM, Chris Angelico ros...@gmail.com wrote: On Fri, Feb 28, 2014 at 3:27 AM, Eric Jacoboni eric.jacob...@gmail.com wrote: But, imho, it's far from being a intuitive result, to say the least. It's unintuitive, but it's a consequence of the way += is defined. If

Re: intersection, union, difference, symmetric difference for dictionaries

2014-02-25 Thread Nick Timkovich
On Tue, Feb 25, 2014 at 2:32 PM, mauro ma...@gmail.com wrote: So I wonder why operations such us intersection, union, difference, symmetric difference that are available for sets and are not available for dictionaries without going via key dictviews. How would the set operations apply to the

[issue20693] Sidebar scrolls down 2x as fast as page content

2014-02-19 Thread Nick Timkovich
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

Generator using item[n-1] + item[n] memory

2014-02-14 Thread Nick Timkovich
I have a Python 3.x program that processes several large text files that contain sizeable arrays of data that can occasionally brush up against the memory limit of my puny workstation. From some basic memory profiling, it seems like when using the generator, the memory usage of my script balloons

Re: Generator using item[n-1] + item[n] memory

2014-02-14 Thread Nick Timkovich
Ah, I think I was equating `yield` too closely with `return` in my head. Whereas `return` results in the destruction of the function's locals, `yield` I should have known keeps them around, a la C's `static` functions. Many thanks! -- https://mail.python.org/mailman/listinfo/python-list

Re: Generator using item[n-1] + item[n] memory

2014-02-14 Thread Nick Timkovich
...@panix.com wrote: In article mailman.6952.1392433921.18130.python-l...@python.org, Nick Timkovich prometheus...@gmail.com wrote: Ah, I think I was equating `yield` too closely with `return` in my head. Whereas `return` results in the destruction of the function's locals, `yield` I should

Re: Async serial communication/threads sharing data

2009-03-22 Thread Nick Timkovich
On Mar 21, 9:19 pm, Jean-Paul Calderone exar...@divmod.com wrote: On Sat, 21 Mar 2009 13:52:21 -0700 (PDT), Nick Timkovich prometheus...@gmail.com wrote: I've been working on a program that will talk to an embedded device over the serial port, using some basic binary communications

Async serial communication/threads sharing data

2009-03-21 Thread Nick Timkovich
I've been working on a program that will talk to an embedded device over the serial port, using some basic binary communications with messages 4-10 bytes long or so. Most of the nuts and bolts problems I've been able to solve, and have learned a little about the threading library to avoid