[issue27307] string.Formatter does not support key/attribute access on unnumbered fields

2020-03-19 Thread Eric V. Smith
Eric V. Smith added the comment: It would be good if someone could convert this to a pull request and beef up the tests. -- ___ Python tracker <https://bugs.python.org/issue27

[issue39380] ftplib uses latin-1 as default encoding

2020-03-20 Thread Eric V. Smith
Eric V. Smith added the comment: I agree with Victor. -- ___ Python tracker <https://bugs.python.org/issue39380> ___ ___ Python-bugs-list mailing list Unsub

[issue40005] Getting different result in python 2.7 and 3.7.

2020-03-20 Thread Eric V. Smith
Eric V. Smith added the comment: I agree it's not a bug. It's a known difference between Windows and Linux, due to fork() semantics. -- ___ Python tracker <https://bugs.python.o

[issue40035] Filtration of the .txt file

2020-03-21 Thread Eric V. Smith
Eric V. Smith added the comment: What versions of Windows were involved? Are the versions of Python the same? What's the exact version? Best would be the 2 lines you get after running python, like: $ python3 Python 3.7.4 (default, Jul 21 2019, 14:43:25) [GCC 7.4.0] on cygwin Please pr

[issue40035] Filtration of the .txt file

2020-03-21 Thread Eric V. Smith
Eric V. Smith added the comment: So are you saying that you see this problem on the current version of Windows that you're running, but whether or not you see the problem depends on if the file was created before or after you updated Windows? How are you creating these files? Does the

[issue40035] Filtration of the .txt file

2020-03-21 Thread Eric V. Smith
Eric V. Smith added the comment: I don't see a problem here. Your first file has more lines, so it produces more output than the second file. Presumably the difference in output you see when you run your program is a result of this. But since we can't see the code, we can'

[issue40053] Document the behavior that no interplotation is applied when no *args are passed in for logging statements

2020-03-24 Thread Eric V. Smith
Eric V. Smith added the comment: I think it's important that logging has this feature for the reasons stated, so it should be documented. And hopefully it's also tested for, but I haven't looked. -- assignee: -> docs@python components: +Documentation -Library

[issue40054] Allow formatted strings as docstrings

2020-03-24 Thread Eric V. Smith
Eric V. Smith added the comment: The problem is that __doc__ is set at compile time, not run time. The ''.format call (and f-strings) are evaluated at run time. -- nosy: +eric.smith ___ Python tracker <https://bugs.python.o

[issue40062] islapha method returns True when the word is japanese

2020-03-25 Thread Eric V. Smith
Eric V. Smith added the comment: >From the documentation: >https://docs.python.org/3/library/stdtypes.html#str.isalpha Alphabetic characters are those characters defined in the Unicode character database as “Letter”, i.e., those with general category property being one of “Lm”, “Lt

[issue40062] islapha method returns True when the word is japanese

2020-03-25 Thread Eric V. Smith
Eric V. Smith added the comment: That last line should have been "I'm assuming those characters all have one of these properties." I'm going to close this issue. If you still think there's a bug here, you can let us know why and reopen this issue. -- resolu

[issue40074] pickle module dump and load: add support for string file names

2020-03-26 Thread Eric V. Smith
Eric V. Smith added the comment: I think it's a bad design to overload a function based on the type of am argument. I realize the stdlib does this in a number of places, for older functions. I don't think we'd add such a function today. I might not object to a new pickle API

[issue40053] Document the behavior that no interplotation is applied when no *args are passed in for logging statements

2020-03-26 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks for the bug report! I'll mark it "fixed". If there's more to do, let us know. -- resolution: -> fixed ___ Python tracker <https://

[issue40080] Stripping annotations out as a new optimization mode

2020-03-26 Thread Eric V. Smith
Eric V. Smith added the comment: Note that dataclasses will break without annotations. -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue40

[issue40081] List sorting

2020-03-26 Thread Eric V. Smith
Eric V. Smith added the comment: In the future, please use the python-tutor or python-list mailing lists if you need help. If you still think you've found a bug in python, then open an issue here. https://mail.python.org/mailman/listinfo/tutor https://mail.python.org/mailman/listinfo/p

[issue40117] __round__ doesn't behave well with return NotImplemented

2020-03-30 Thread Eric V. Smith
Eric V. Smith added the comment: NotImplemented is documented as only being used for binary operators: https://docs.python.org/3/library/constants.html#NotImplemented Changing that seems like a pretty large issue. I'd suggest discussing this on python-ideas. Maybe better for your situ

[issue40124] Clearer assertion error

2020-03-31 Thread Eric V. Smith
Eric V. Smith added the comment: Do we really want this to be just an assert, or do we want to raise another type of exception? I think it's showing a real programming error that we wouldn't want to throw away with -O. -- nosy: +

[issue40206] Multiplying 4.6*100 will result in 459.99999999999994

2020-04-06 Thread Eric V. Smith
Eric V. Smith added the comment: See https://docs.python.org/3.8/tutorial/floatingpoint.html -- nosy: +eric.smith resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue40236] datetime.datetime.strptime get day error

2020-04-09 Thread Eric V. Smith
Eric V. Smith added the comment: Can you tell us what platform you're on? Also, please include the header that's printed out when you run python from the command line. For example, mine shows: $ python3 Python 3.7.6 (default, Jan 30 2020, 10:29:04) [GCC 9.2.1 20190827 (Red Hat 9.

[issue40236] datetime.datetime.strptime get day error

2020-04-09 Thread Eric V. Smith
Eric V. Smith added the comment: I thought that strptime is platform specific (which is why I asked for the platform info). But, looking at the existing docs https://docs.python.org/3.5/library/time.html#time.strptime "But strptime() is independent of any platform and thus doe

[issue40242] zmq mysql core dump

2020-04-09 Thread Eric V. Smith
Eric V. Smith added the comment: This looks like a problem in zmq, pyzmq, or mysql-connector-python, not in python itself. I'd suggest asking in a mysql-connector-python specific location for starters. You should also try to duplicate the problem without importing zmq, which doesn&#

[issue40242] zmq mysql core dump

2020-04-10 Thread Eric V. Smith
Eric V. Smith added the comment: I'm going to close this. If you can provide information on how to reproduce this and/or what you observe in the segfault dump, we will happily reopen it. I think the best "resolution" tag is to call this "third party", but I'm

[issue40248] Proposed class for collections: dynamicdict

2020-04-10 Thread Eric V. Smith
Eric V. Smith added the comment: You probably want to bring this up on the python-ideas mailing list for discussion. Features like this typically get discussed there first. -- nosy: +eric.smith ___ Python tracker <https://bugs.python.

[issue40250] unable to comment out r'\u' string with triple quote marks

2020-04-10 Thread Eric V. Smith
Eric V. Smith added the comment: This basically comes down to """\u""" not being a valid string. I'm not sure why you'd expect this to work: triple quoted strings are not designed as a general purpose "comment out" facility, and as you'

[issue40264] List item inside tuple seemingly allows for item assignment even after throwing error

2020-04-12 Thread Eric V. Smith
Eric V. Smith added the comment: This isn't a bug. See the FAQ: https://docs.python.org/3/faq/programming.html#why-does-a-tuple-i-item-raise-an-exception-when-the-addition-works -- nosy: +eric.smith resolution: -> not a bug stage: -> resolved status: ope

[issue40274] 3D plotting library doesn't occlude objects by depth/perspective (objects in the scene are printed in layers).

2020-04-13 Thread Eric V. Smith
Eric V. Smith added the comment: I'm not sure which of the libraries is the 3d plotting library you're referring to (maybe matplotlib?), but in any event it doesn't ship with python, so this isn't the appropriate bug tracker to report your issue. If it is matplotlib, th

[issue40274] 3D plotting library doesn't occlude objects by depth/perspective (objects in the scene are printed in layers).

2020-04-13 Thread Eric V. Smith
Change by Eric V. Smith : -- resolution: -> third party status: open -> closed ___ Python tracker <https://bugs.python.org/issue40274> ___ ___ Python-bugs-

[issue40311] docs.python.org banner - release blocker for 2.7.18

2020-04-17 Thread Eric V. Smith
Eric V. Smith added the comment: I'm marking it as a release blocker, as I believe that's the correct priority if it must be done before the 2.7.18 release. -- nosy: +eric.smith priority: normal -> release blocker ___ Python tr

[issue40337] builtins.RuntimeError: Caught RuntimeError in pin memory thread for device 0.

2020-04-20 Thread Eric V. Smith
Eric V. Smith added the comment: This appears to be a problem in a third-party library: torch. You didn't include any code example that triggers the problem. Without some way to duplicate this issue, there's not much we can do about it. -- nosy: +

[issue40337] builtins.RuntimeError: Caught RuntimeError in pin memory thread for device 0.

2020-04-21 Thread Eric V. Smith
Eric V. Smith added the comment: Unless the original poster can provide more information (and preferably a way to reproduce this), I'm going to close this. -- status: open -> pending ___ Python tracker <https://bugs.python.org

[issue40351] How to edit "python --help"?

2020-04-21 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks, Rémi. Nino: Please don't ask help questions on the bug tracker, only report bugs here. For general questions you can try the python-list mailing list or Stack Overflow. -- nosy: +eric.smith resolution: -> not a bug stage: -> reso

[issue40356] OverflowError: mktime argument out of range

2020-04-21 Thread Eric V. Smith
Eric V. Smith added the comment: FWIW, that time.struct_time value is: >>> d time.struct_time(tm_year=2020, tm_mon=4, tm_mday=16, tm_hour=19, tm_min=12, tm_sec=35, tm_wday=3, tm_yday=107, tm_isdst=1) I don't get an error on 3.7.4 from Cygwin or 3.7.6 fro

[issue40363] shlex.quote applied to a glob pattern disables glob matching

2020-04-22 Thread Eric V. Smith
Eric V. Smith added the comment: Agreed that shlex.quote is working as intended. It's goal is to pass something to the shell, preserving it just as you started with it. It exists exactly because you want to avoid shell globbing and parsing issues (consider filenames that contain space

[issue40363] shlex.quote applied to a glob pattern disables glob matching

2020-04-22 Thread Eric V. Smith
Eric V. Smith added the comment: I meant to add: it's possible that this isn't well documented. -- ___ Python tracker <https://bugs.python.o

[issue40375] Add the UNSELECT command to imaplib

2020-04-23 Thread Eric V. Smith
New submission from Eric V. Smith : RFC 3691 from 2004 adds support for the UNSELECT command as an extension capability. https://tools.ietf.org/html/rfc3691 imaplib does not support UNSELECT. -- components: Library (Lib) messages: 367165 nosy: eric.smith priority: normal severity

[issue40337] builtins.RuntimeError: Caught RuntimeError in pin memory thread for device 0.

2020-04-25 Thread Eric V. Smith
Eric V. Smith added the comment: If you have more information, please provide it and re-open this issue. -- resolution: -> rejected stage: -> resolved status: pending -> closed ___ Python tracker <https://bugs.python.or

[issue40437] add string.snake function

2020-04-29 Thread Eric V. Smith
Eric V. Smith added the comment: What would be the full specification of this? If you want to use it for column names, what happens if the string starts with a $, or some character that can't be used by your particular database? I'm skeptical that this could be general purpose en

[issue40246] Different error messages for same error - invalid string prefixes

2020-04-29 Thread Eric V. Smith
Eric V. Smith added the comment: >From earlier in this issue: https://bugs.python.org/msg366164 > So a slightly shorter example uses ru''. This is an error because you can't > combine the r prefix and the u prefix (in fact you can't combine anything > with

[issue40246] Different error messages for same error - invalid string prefixes

2020-04-29 Thread Eric V. Smith
Eric V. Smith added the comment: I think you're right, since rb obviously works, too. I just wanted to make sure we're covering all the bases. There's some code in either the stdlib or the test suite where I generate all of the valid prefixes (it's something like 80 pre

[issue40437] add string.snake function

2020-04-29 Thread Eric V. Smith
Eric V. Smith added the comment: So then it appears the snake case function couldn't be used for database column names, without some additional processing. So, what is the use case for it? I just don't see a lot of use for this. --

[issue40437] add string.snake function

2020-04-29 Thread Eric V. Smith
Eric V. Smith added the comment: I remain unconvinced, but I'm only one person. You might want to bring this up on python-ideas to see if it can get some more support. But be aware this is going to have much less support that the recent PEP 616 removeprefix/removesuffix discussion,

[issue40437] add string.snake function

2020-04-29 Thread Eric V. Smith
Eric V. Smith added the comment: > One can also argue why python need to maintain str conversion at all if we > have such good extensions in different libs. Back when we were starting python 3.x there was discussion or removing these from str and bytes, but it was decided that br

[issue40437] add string.snake function

2020-04-30 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks for the suggestion and the discussion. I'll close the issue. -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.pyth

[issue40450] a=[1,2,3] a=a.extend([4]) after running these two lines of code a is None,but it should be [1,2,3,4]

2020-04-30 Thread Eric V. Smith
New submission from Eric V. Smith : list.extend modifies the list in place. Like most mutating methods in python, it does not return the thing being modified. Everything is working correctly, and it's documented this way. -- nosy: +eric.smith resolution: wont fix -> not a b

[issue40451] Unexpected sys.getrefcount(foo) output

2020-04-30 Thread Eric V. Smith
Eric V. Smith added the comment: aux is equal to 1. You're seeing the refcount of the number 1. -- nosy: +eric.smith resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.pyth

[issue40463] csv.reader split error

2020-05-01 Thread Eric V. Smith
Eric V. Smith added the comment: You should tell us what you're seeing, and what you're expecting. I'm adding the rest of this not because it solves your problem, but because it might help you or someone else troubleshoot this further. Here's a simpler reproducer: impo

[issue40470] Make inspect.signature able to parse format strings.

2020-05-01 Thread Eric V. Smith
Change by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue40470> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40524] Print() issue

2020-05-05 Thread Eric V. Smith
Eric V. Smith added the comment: This is not the place to ask for help programming with python. What you're seeing is that your attribute_set or attribute_names mapping are missing whatever data you think should be present. I suggest you ask for help on the python-list or python-

[issue40532] Persmission error

2020-05-06 Thread Eric V. Smith
Eric V. Smith added the comment: What editor are you using? What platform? What file are you trying to edit? -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue40

[issue36077] Inheritance dataclasses fields and default init statement

2020-05-06 Thread Eric V. Smith
Eric V. Smith added the comment: It would be good if there were some way of unifying existing usage with positional-only and keyword-only parameters, and also supporting inheritance for dataclasses that use these features at various points in the hierarchy. I don't have any big ideas

[issue40532] Persmission error

2020-05-08 Thread Eric V. Smith
Eric V. Smith added the comment: I'm going to close this. @Coder436: If you have more information that points to a python bug, please attach it and reopen this issue. -- resolution: -> not a bug stage: -> resolved status: ope

[issue40565] is comparison returns False while ids are the same.

2020-05-08 Thread Eric V. Smith
Eric V. Smith added the comment: This isn't doing what you think. Because you throw away the object after computing its id, the same memory is reused and you get the same id. Consider: >>> a = [1,2,3] >>> b = [3,4,5] >>> id(a[:]) == id(b[:]) True There

[issue40576] Align docs for list.sort, sorted, and on the website

2020-05-09 Thread Eric V. Smith
Eric V. Smith added the comment: sorted() does not just delegate to list.sort(): it sorts any iterable. >>> sorted({0:1,2:3,-1:4}) [-1, 0, 2] I think your change conflates the two by pointing to list.sort() from sorted(). -- nosy: +e

[issue40576] Align docs for list.sort, sorted, and on the website

2020-05-09 Thread Eric V. Smith
Eric V. Smith added the comment: I still think it's a mistake to point to list.sort() from sorted(). If anything I think it should be the other way around. We'll see what other people think. -- ___ Python tracker <https://bu

[issue40583] Runtime type annotation mutation leads to inconsistent behavior

2020-05-10 Thread Eric V. Smith
Change by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue40583> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40595] AttributeError from type annotation

2020-05-11 Thread Eric V. Smith
Eric V. Smith added the comment: This is not an annotations-only issue. This is no different from: import re class MyClass(object): def re(self): pass m = re.Match Which gives the same error. It's being evaluated at class scope. -- nosy: +eric.

[issue40598] round() does not return an integer when given a numpy float64

2020-05-11 Thread Eric V. Smith
Eric V. Smith added the comment: Wouldn't float64's __round__ method be in complete control of this? For python's float: >>> x = 3.4 >>> type(x.__round__(1)) >>> type(x.__round__()) And Decimal: >>> from decimal import Decimal >>

[issue40615] unstable behaviour for options in argparse

2020-05-13 Thread Eric V. Smith
Eric V. Smith added the comment: I wish the abbreviation behavior was opt-in instead of opt-out, but such is life. Closing as not a bug. -- nosy: +eric.smith resolution: -> not a bug stage: -> resolved status: open -> closed type: -&

[issue40633] json.dumps() should encode float number NaN to null

2020-05-15 Thread Eric V. Smith
Eric V. Smith added the comment: Since this is documented behavior (https://docs.python.org/3.8/library/json.html#infinite-and-nan-number-values), we can't change it by default without breaking code. What JavaScript JSON encoders and decoders specifically have a problem with this beh

[issue40633] json.dumps() should encode float number NaN to null

2020-05-15 Thread Eric V. Smith
Eric V. Smith added the comment: I think that's reasonable, although I could see someone objecting ("just use simplejson instead"). I suggest discussing this on the python-ideas mailing list and see what people think over there. It might help to create a PR first, if it'

[issue40583] Runtime type annotation mutation leads to inconsistent behavior

2020-05-15 Thread Eric V. Smith
Eric V. Smith added the comment: But this is no different from every other mutable class variable in Python: class Base: data = {} class Alpha(Base): pass class Beta(Base): data = {} Alpha.data['injected'] = bool assert Alpha.data is Base.data Beta.data['injecte

[issue40583] Runtime type annotation mutation leads to inconsistent behavior

2020-05-15 Thread Eric V. Smith
Eric V. Smith added the comment: Perhaps it should be better documented. I don't see the behavior changing. -- ___ Python tracker <https://bugs.python.org/is

[issue40633] json.dumps() should encode float number NaN to null

2020-05-16 Thread Eric V. Smith
Eric V. Smith added the comment: I don't think we want to generate output no matter what. Should datetime instances become null instead of raising an exception? Are there types other than float where some values are json serializable and others a

[issue40642] Cpython "pystate.h" subdirectory wrong

2020-05-16 Thread Eric V. Smith
Eric V. Smith added the comment: Won't either one work, since "Include" is in the "search path"? Is this causing an actual problem? You have this marked as "compile error", but haven't shown any information about the error, such as what compiler, how

[issue40646] Builtins in doc show signature in documentation

2020-05-16 Thread Eric V. Smith
Eric V. Smith added the comment: It's a common convention to show a function with parens, even if it can't be called with no arguments. I don't think we want to make that table visually more complex by including all of the message signatures. open() has 8 params, min()

[issue40633] json.dumps() should encode float number NaN to null

2020-05-18 Thread Eric V. Smith
Eric V. Smith added the comment: I think it should be closed. -- ___ Python tracker <https://bugs.python.org/issue40633> ___ ___ Python-bugs-list mailin

[issue40646] Builtins in doc show signature in documentation

2020-05-18 Thread Eric V. Smith
Eric V. Smith added the comment: "message signatures" -> "function signatures" -- ___ Python tracker <https://bugs.python.org/issue40646> ___ ___

[issue42482] TracebackException should not hold reference to the exception traceback

2020-11-27 Thread Eric V. Smith
Change by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue42482> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42500] crash with unbounded recursion in except statement

2020-11-29 Thread Eric V. Smith
Eric V. Smith added the comment: Here's the smallest reproducer I could come up with. It fails on Windows with 3.9 native(compiled locally) (Fatal Python error: _Py_CheckRecursiveCall: Cannot recover from stack overflow), works (raises RecursionError) with cygwin 3.8.3. import os

[issue42500] crash with unbounded recursion in except statement

2020-11-29 Thread Eric V. Smith
Eric V. Smith added the comment: Note that changing the os.fstat line to just "raise OSError()" no longer causes the "Fatal Python error", but rather gives the expected recursion exception. Here's a shorter version that causes the fatal error in Windows native 3.9,

[issue39096] "Format Specification Mini-Language" doc mistake for Decimal

2020-11-29 Thread Eric V. Smith
Eric V. Smith added the comment: These changes are a big improvement. Thanks, Mark. Should this issue be closed, or are you thinking of more changes? Personally I think we should leave it as it is now, and open another issue if people find fault with the new docs

[issue42437] crypt produces wrong hashes for passwords containing dollar sign

2020-11-29 Thread Eric V. Smith
Change by Eric V. Smith : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue42437> ___ ___

[issue42506] Unexpected output when running test_format

2020-11-29 Thread Eric V. Smith
Change by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue42506> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42518] Error Message

2020-11-30 Thread Eric V. Smith
Eric V. Smith added the comment: This appears to be similar to issue42488, which it looks like you also reported, with a different account. It's not clear to me why you expect the output to be False. But in any event, this is not a bug in Python. >>> 100 ^ 1000 908 Please

[issue42543] case sensitivity in open() arguments

2020-12-03 Thread Eric V. Smith
Eric V. Smith added the comment: Although I'm not sure the existing message needs changing, if a change is going to be made I think listing the valid option characters might be more useful. -- nosy: +eric.smith ___ Python tracker &

[issue42563] max function reports type errors in incorrect order

2020-12-04 Thread Eric V. Smith
Eric V. Smith added the comment: I don't think making a change would be worth the risk. -- nosy: +eric.smith priority: low -> normal versions: +Python 3.8 -Python 3.10 ___ Python tracker <https://bugs.python.org

[issue42570] Try and Except doesn't work properly

2020-12-04 Thread Eric V. Smith
Eric V. Smith added the comment: You've not said what happens, nor what you're expecting to happen, so we cannot help you. -- nosy: +eric.smith ___ Python tracker <https://bugs.python.o

[issue17612] hooks/mail.py requires [smtp] host to be set, despite a comment to the contrary

2020-12-05 Thread Eric V. Smith
Change by Eric V. Smith : -- resolution: -> out of date stage: -> resolved status: pending -> closed ___ Python tracker <https://bugs.python.or

[issue42572] Better path handling with argparse

2020-12-06 Thread Eric V. Smith
Eric V. Smith added the comment: I think this would be a type, not an action. I'm not sure this would pass the bar of something that should be added to the stdlib. But in any event, it should be developed on PyPI first, perhaps by adding it to argparse-types. -- nosy: +eric.

[issue42572] Better path handling with argparse

2020-12-07 Thread Eric V. Smith
Eric V. Smith added the comment: Hi, Austin. If it's something that can be implemented in a library (which this suggestion qualifies as), then we typically want to see it on PyPI and to gain some traction there. I only suggested argparse-types because it also has some argparse add-ons

[issue42572] Better path handling with argparse

2020-12-08 Thread Eric V. Smith
Eric V. Smith added the comment: The more I think about this, the more I think it shouldn't be in the stdlib. paul.j3 is correct that the simple case is just type=pathlib.Path. For something more adventurous you could start with: @dataclass(eq=True, frozen=True) class Argumen

[issue42607] raw strings SyntaxError

2020-12-08 Thread Eric V. Smith
Eric V. Smith added the comment: This is a FAQ: https://docs.python.org/3/faq/design.html#why-can-t-raw-strings-r-strings-end-with-a-backslash Raw strings can't end with an odd number of backslashes. -- components: -Windows nosy: +eric.smith resolution: -> not a b

[issue42632] Reassgining ZeroDivisionError will lead to bug in Except clause

2020-12-14 Thread Eric V. Smith
Eric V. Smith added the comment: This code is working as expected, so I'm closing this. -- nosy: +eric.smith resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.pyth

[issue42632] Reassgining ZeroDivisionError will lead to bug in Except clause

2020-12-14 Thread Eric V. Smith
Eric V. Smith added the comment: And thanks, Dennis, for the explanation as to why it's the expected behavior. -- ___ Python tracker <https://bugs.python.org/is

[issue42646] Add function that supports "applying" methods

2020-12-15 Thread Eric V. Smith
Eric V. Smith added the comment: This seems way too special case for the stdlib, and especially not as a builtin. I've never seen this pattern before. Why is copy so special? I suggest raising this on the python-ideas mailing list if you'd like to get some traction for it. -

[issue42664] strptime(%c) fails to parse the output of strftime(%c)

2020-12-16 Thread Eric V. Smith
Eric V. Smith added the comment: You have the parameters to strptime backward. >>> datetime.datetime.strptime(datetime.datetime.now().strftime("%c"), "%c") datetime.datetime(2020, 12, 16, 20, 51, 38) -- nosy: +eric.smith _

[issue42664] strptime(%c) fails to parse the output of strftime(%c)

2020-12-16 Thread Eric V. Smith
Change by Eric V. Smith : -- resolution: -> not a bug stage: -> resolved status: open -> closed type: -> behavior ___ Python tracker <https://bugs.python

[issue42677] Support comments in argparse fromfile_prefix_chars files

2020-12-18 Thread Eric V. Smith
Eric V. Smith added the comment: I think you could achieve this by overriding convert_arg_line_to_args. If this were baked in to argparse, there would need to be an argument to argparse.ArgumentParser to turn on this behavior, with the default being to not support comments. That's be

[issue42677] Support comments in argparse fromfile_prefix_chars files

2020-12-19 Thread Eric V. Smith
Eric V. Smith added the comment: Have you tried returning an empty list? -- ___ Python tracker <https://bugs.python.org/issue42677> ___ ___ Python-bugs-list m

[issue41724] SQLite returns "str" instead of "datetime.datetime" with aggregate queries.

2020-12-19 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset 09a36cdfb7c22f44df45b44e5561776206bcedfb by sblondon in branch 'master': bpo-41724: Explain when the conversion is not possible with detect_types enabled (GH-23855) https://github.com/python/cpyt

[issue41724] SQLite returns "str" instead of "datetime.datetime" with aggregate queries.

2020-12-19 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset a34ab8188e0352e4066da4f79ed3cc24d1b61a63 by Miss Islington (bot) in branch '3.9': bpo-41724: Explain when the conversion is not possible with detect_types enabled (GH-23855) (GH-23862) https://github.com/python/cpyt

[issue41724] SQLite returns "str" instead of "datetime.datetime" with aggregate queries.

2020-12-19 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset 24862b02dfd1e2843727f28fa2ba05828fdfa8de by Miss Islington (bot) in branch '3.8': bpo-41724: Explain when the conversion is not possible with detect_types enabled (GH-23855) (GH-23863) https://github.com/python/cpyt

[issue41724] SQLite returns "str" instead of "datetime.datetime" with aggregate queries.

2020-12-19 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks for the PR! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue42669] "except" documentation still suggests nested tuples are allowed

2020-12-20 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset 409ce4a09e4f96ca9b251c19f5819205aae9ae34 by Miss Islington (bot) in branch '3.9': bpo-42669: Document that `except` rejects nested tuples (GH-23822) (GH-23870) https://github.com/python/cpython/commit/409ce4a09e4f96ca9b251c19f58192

[issue42669] "except" documentation still suggests nested tuples are allowed

2020-12-20 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset 81f706d2db0f57c4fdd747df6e0a4cffcbc54704 by Miss Islington (bot) in branch '3.8': bpo-42669: Document that `except` rejects nested tuples (GH-23822) (GH-23871) https://github.com/python/cpython/commit/81f706d2db0f57c4fdd747df6e0a4c

[issue42669] "except" documentation still suggests nested tuples are allowed

2020-12-20 Thread Eric V. Smith
Change by Eric V. Smith : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue42680] unicode identifiers not accessible or assignable through globals()

2020-12-20 Thread Eric V. Smith
Eric V. Smith added the comment: I think documenting this with globals() and locals() is a good idea. That's the place this is most likely to trip someone up. -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/is

[issue42699] Use `.join(k for k in g)` instead of `.join([k for k in g])`

2020-12-20 Thread Eric V. Smith
Eric V. Smith added the comment: Do you have any benchmarks to show this is an actual improvement? Often times it is not. -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue42

[issue42699] Use `.join(k for k in g)` instead of `.join([k for k in g])`

2020-12-21 Thread Eric V. Smith
Eric V. Smith added the comment: @samuelmarks: A place where there it is possible to improve performance is with f-strings replacing %-formatting or str.format. This does move significant work to compile time. However, we'd be unlikely to accept a wholesale stdlib change that swaps

[issue42699] Use `.join(k for k in g)` instead of `.join([k for k in g])`

2020-12-21 Thread Eric V. Smith
Eric V. Smith added the comment: > Wait I don't understand why you wouldn't accept a wholesale replacement of > all `%` and `format` with f-strings through the entire CPython codebase > [master branch]? For such a large change it's difficult to review every single

[issue42699] Use `.join(k for k in g)` instead of `.join([k for k in g])`

2020-12-21 Thread Eric V. Smith
Eric V. Smith added the comment: See https://github.com/ikamensh/flynt#dangers-of-conversion for reasons. Would I like to see all string literal formatting done with f-strings? Yes! Would I accept the risk and hassle of doing it blindly? No

<    5   6   7   8   9   10   11   12   13   14   >