[issue38498] The expression '' in '' == '' is evaluated as True

2019-10-16 Thread Eric V. Smith
Eric V. Smith added the comment: For future reference: Specifically, note that: '' in '' == '' is equivalent to: ('' in '') and ('' == '') -- nosy: +eric.smith resolution: works for me -> not a bug ___

[issue38496] Python3 allows mixture of tabs and spaces for indentation

2019-10-16 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks, Serhiy. This has been reported in 24260, so I'm closing this issue. -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> TabError behavior doesn't match documentat

[issue38496] Python3 allows mixture of tabs and spaces for indentation

2019-10-16 Thread Eric V. Smith
Eric V. Smith added the comment: I can verify this on 3.7.4. -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue38496> ___ ___ Python-bug

[issue38481] Class static property not static

2019-10-15 Thread Eric V. Smith
Eric V. Smith added the comment: When you assign to self.num, you're creating an instance variable which hides the class variable. Instead, assign directly to the class variable: class D: num = 0 def __init__(self): D.num += 1 print('D num', self.num)

[issue38462] Typo (nam ing) in import system docs

2019-10-13 Thread Eric V. Smith
Change by Eric V. Smith : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue38462> ___ ___

[issue38462] Typo (nam ing) in import system docs

2019-10-13 Thread Eric V. Smith
Eric V. Smith added the comment: I'm not seeing this in either the master or 3.5 branches. Perhaps this is being done locally by your browser? Unfortunately I can't find a way for github to link to a specific line in a .rst file, but when I look at the source code and https://

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

2019-10-11 Thread Eric V. Smith
Eric V. Smith added the comment: I don't think it's any more precise. It just seems verbose and confusing to me, while conveying the same information. `[arg [arg ...]]` to me means "optionally, an arg followed by one or more optional args". While `[arg ...]` to me me

[issue38444] dataclass: always generate default __init__ on __default_init__

2019-10-11 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks. I'm always looking for ways to make dataclasses easier to use, while keeping within the original goals. I'll close this for now. -- resolution: -> wont fix stage: -> resolved status

[issue38444] dataclass: always generate default __init__ on __default_init__

2019-10-11 Thread Eric V. Smith
Eric V. Smith added the comment: I'll try and think of something better. I know I'm guilty of sending to python-ideas all the time, but discussing proposed design decisions like this are what that list is all about. If you want to bring it up there, I'd focus on mak

[issue38444] dataclass: always generate default __init__ on __default_init__

2019-10-11 Thread Eric V. Smith
Eric V. Smith added the comment: Doesn't __post_init__ address this use case? -- ___ Python tracker <https://bugs.python.org/issue38444> ___ ___ Pytho

[issue38444] dataclass: always generate default __init__ on __default_init__

2019-10-11 Thread Eric V. Smith
Eric V. Smith added the comment: This would be a 3.9 feature only, so changing the versions. -- versions: -Python 3.7, Python 3.8 ___ Python tracker <https://bugs.python.org/issue38

[issue38444] dataclass: always generate default __init__ on __default_init__

2019-10-11 Thread Eric V. Smith
Change by Eric V. Smith : -- assignee: -> eric.smith nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue38444> ___ ___ Python-bugs-list mai

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

2019-10-10 Thread Eric V. Smith
Eric V. Smith added the comment: I think [arg ...] would make sense. Removing 3.5 and 3.6, since they're in security only mode. Adding 3.9. -- nosy: +eric.smith versions: +Python 3.9 -Python 3.5, Python 3.6 ___ Python tracker &

[issue38408] urlparse gives no method to build a url with a port

2019-10-09 Thread Eric V. Smith
Eric V. Smith added the comment: Okay, then I'll close this. -- resolution: -> wont fix stage: -> resolved status: open -> closed type: -> behavior ___ Python tracker <https://bugs.p

[issue38408] urlparse gives no method to build a url with a port

2019-10-09 Thread Eric V. Smith
Eric V. Smith added the comment: Yes, that does work: >>> urllib.parse.urlunparse(("http", f"{host}:{port}", "/", "", "", "")) 'http://hostname:1234/' The only problem is that your code now needs to look like &

[issue38408] urlparse gives no method to build a url with a port

2019-10-08 Thread Eric V. Smith
Eric V. Smith added the comment: One way I can think of doing this in a backward compatible way is to add keyword parameters to urlunparse, like: def urlunparse(components, *, username=None, password=None, hostname=None, port=None): Which would make your call: site_to_test

[issue38401] Make dataclass attribute docstrings accessible

2019-10-08 Thread Eric V. Smith
Eric V. Smith added the comment: Note that those strings are not docstrings, per se. They're just strings, and aren't available in the class definition for the dataclass decorator to see. It's really no different from: class X: x: int 3 That 3 just gets evaluated

[issue38366] dataclasses: generate the _hash_action table from the if-else tree

2019-10-04 Thread Eric V. Smith
Eric V. Smith added the comment: Thank you for your contribution, @iomintz, but I'm not going to accept this change. I don't think it improves the clarity of the code. And I realize this is wholly a subjective decision, and others may disagree. But to me, looking at the table

[issue38366] dataclasses: generate the _hash_action table from the if-else tree

2019-10-03 Thread Eric V. Smith
Eric V. Smith added the comment: I don't see that as an improvement, especially when the goal is to not change any functionality. But maybe I'm just used to truth tables. To me, the truth table makes it clear that each case is handled correctly. -- assignee: -> er

[issue38351] Modernize email example from %-formatting to f-string

2019-10-02 Thread Eric V. Smith
Eric V. Smith added the comment: >> I definitely think we should not modify any code in the stdlib just to >> switch to f-strings. > Does this also apply to updating code to use f-strings in an area that's > already being modified for a functional purpose? No.

[issue38351] Modernize email example from %-formatting to f-string

2019-10-02 Thread Eric V. Smith
Eric V. Smith added the comment: I definitely think we should not modify any code in the stdlib just to switch to f-strings. I think the code examples in the docs would benefit from a consistent style, and since f-strings are the least verbose way to format strings, I'd endorse using

[issue36470] dataclasses.replace raises an exception if InitVar with default argument is not provided.

2019-10-01 Thread Eric V. Smith
Change by Eric V. Smith : -- assignee: -> eric.smith ___ Python tracker <https://bugs.python.org/issue36470> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue38297] Imports at top of module is often not used

2019-09-27 Thread Eric V. Smith
Eric V. Smith added the comment: I think PEP 8 should say "Module-level imports are always put at the top of the file, ...". -- nosy: +eric.smith ___ Python tracker <https://bugs.python.o

[issue38228] Missing documentation on strftime modifier O

2019-09-19 Thread Eric V. Smith
Eric V. Smith added the comment: Have you tried this on Windows or macOS? -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue38228> ___ ___

[issue38222] pathlib Path objects should support __format__

2019-09-19 Thread Eric V. Smith
Eric V. Smith added the comment: I'm also -0 on it. It's up to Antoine. -- ___ Python tracker <https://bugs.python.org/issue38222> ___ ___ Python-b

[issue38222] pathlib Path objects should support __format__

2019-09-19 Thread Eric V. Smith
Eric V. Smith added the comment: I don't think anyone is suggesting reverting the decision on object.__format__. That decision should stay. I think the suggestion is to add Path.__format__, which just converts to a string and formats with the given spec. Unless someone can think

[issue38222] pathlib Path objects should support __format__

2019-09-19 Thread Eric V. Smith
Eric V. Smith added the comment: Correct: this change was made specifically so that objects could add their own format specifiers at a later time. If I recall correctly, This change was precipitated by wanting to add datetime.__format__: this change broke existing uses for format() that

[issue38222] pathlib Path objects should support __format__

2019-09-19 Thread Eric V. Smith
Eric V. Smith added the comment: I agree with Serhiy that !s solves the problem. But as a convenience it might be nice to add __format__. This issue pops up from time to time on Path and other types, and I don't think !s is very discoverable. Especially because formatting works w

[issue37904] Suggested edit to Python Tutorial - Section 4

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

[issue37904] Suggested edit to Python Tutorial - Section 4

2019-09-18 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset c47c8ba2969c9faf1c036b3dc4b0a5cf0d3aa0cc by Eric V. Smith (Miss Islington (bot)) in branch '2.7': bpo-37904: Edition on python tutorial - section 4 (GH-16169) (GH-16236) https://github.com/python/cpyt

[issue37904] Suggested edit to Python Tutorial - Section 4

2019-09-18 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset 8b907a8875d1b22d8f060dee9430cc82d471e86b by Eric V. Smith (Miss Islington (bot)) in branch '3.7': bpo-37904: Edition on python tutorial - section 4 (GH-16169) (GH-16235) https://github.com/python/cpyt

[issue37904] Suggested edit to Python Tutorial - Section 4

2019-09-18 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset 7a2f68776a77c782c0abf40dc9e3fb687787e730 by Eric V. Smith (Miss Islington (bot)) in branch '3.8': bpo-37904: Edition on python tutorial - section 4 (GH-16169) (GH-16234) https://github.com/python/cpyt

[issue38050] open('file.txt') path not found

2019-09-07 Thread Eric V. Smith
Eric V. Smith added the comment: This is almost certainly not a bug in Python. This forum is for reporting bugs in Python, not for getting help on using Python. I suggest you try the python-tutor mailing list: https://mail.python.org/mailman/listinfo/tutor -- nosy: +eric.smith

[issue38048] unususal behavior

2019-09-07 Thread Eric V. Smith
Eric V. Smith added the comment: This forum is for reporting bugs in python, not for getting help with writing python programs. I suggest you ask about this on the python-tutor mailing list: https://mail.python.org/mailman/listinfo/tutor Good luck! -- nosy: +eric.smith resolution

[issue38039] Segfault when pickling dictionary with large pandas dataframes

2019-09-05 Thread Eric V. Smith
Eric V. Smith added the comment: Can you provide the code that caused the segfault? -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue38

[issue38025] format

2019-09-04 Thread Eric V. Smith
Eric V. Smith added the comment: When you convert the integer to a float (because of the 'f' in the first format spec), you're losing precision. See: https://docs.python.org/3/tutorial/floatingpoint.html and https://docs.python.org/3/faq/design.html#why-are-floating-point-

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

2019-08-29 Thread Eric V. Smith
Eric V. Smith added the comment: It's turtle.circle: https://docs.python.org/3.5/library/turtle.html#turtle.circle @Yehuda: this isn't the appropriate place for help on how the turtle module works. Please consider the python-tutor list. See https://mail.python.org/mailman/list

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

2019-08-28 Thread Eric V. Smith
Eric V. Smith added the comment: I agree that we should close this and not implement a function to draw a circle centered on the turtle. The fundamental abstraction with turtle graphics is that the turtle is holding a pen. To have the pen draw elsewhere, where the turtle does not go, breaks

[issue37948] get_type_hints fails if there are un-annotated fields in a dataclass

2019-08-26 Thread Eric V. Smith
Change by Eric V. Smith : -- assignee: -> eric.smith ___ Python tracker <https://bugs.python.org/issue37948> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue37912] fstring with quotation marks conflict

2019-08-21 Thread Eric V. Smith
Eric V. Smith added the comment: The lexer sees an f-string: f'some text {something.split(' next to a normal string: ')}' The first of those is not a valid f-string because of the unmatched left brace, so it's an error. I'm contemplating making the f-strin

[issue37904] Suggested edit to Python Tutorial - Section 4

2019-08-21 Thread Eric V. Smith
Eric V. Smith added the comment: I think I'd prefer "... Python uses the usual flow control statements known from other languages ..." It's not just syntax, after all. -- keywords: +newcomer friendly nosy: +eric.smith st

[issue37868] `is_dataclass` returns `True` if `getattr` always succeeds.

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

[issue37868] `is_dataclass` returns `True` if `getattr` always succeeds.

2019-08-19 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset b0f4dab8735f692bcfedcf0fa9a25e238a554bab by Eric V. Smith in branch 'master': bpo-37868: Improve is_dataclass for instances. (GH-15325) https://github.com/python/cpython/commit/b0f4dab8735f692bcfedcf0fa9a25e

[issue37868] `is_dataclass` returns `True` if `getattr` always succeeds.

2019-08-17 Thread Eric V. Smith
Change by Eric V. Smith : -- keywords: +patch pull_requests: +15042 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15325 ___ Python tracker <https://bugs.python.org/issu

[issue37874] json traceback on a float

2019-08-16 Thread Eric V. Smith
Eric V. Smith added the comment: I think Serhiy means 1.e-8 is not valid. The spec says that at least one digit is required in the "frac" part, after the decimal. -- nosy: +eric.smith ___ Python tracker <https://bugs.python.o

[issue37868] `is_dataclass` returns `True` if `getattr` always succeeds.

2019-08-15 Thread Eric V. Smith
Eric V. Smith added the comment: Yeah, I agree it's not an awesome design to work with classes or instances, but it's documented that way. As soon as I write some tests I'll check this in. -- ___ Python tracker <https://bugs.pyt

[issue37868] `is_dataclass` returns `True` if `getattr` always succeeds.

2019-08-15 Thread Eric V. Smith
Eric V. Smith added the comment: I'm guessing I'm looking up the attribute on the instance, not the class. -- ___ Python tracker <https://bugs.python.o

[issue37868] `is_dataclass` returns `True` if `getattr` always succeeds.

2019-08-15 Thread Eric V. Smith
Change by Eric V. Smith : -- assignee: -> eric.smith nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue37868> ___ ___ Python-bugs-list mai

[issue37830] continue in finally with return in try results with segfault

2019-08-12 Thread Eric V. Smith
Change by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue37830> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37830] continue in finally with return in try results with segfault

2019-08-12 Thread Eric V. Smith
Change by Eric V. Smith : -- components: +Interpreter Core type: -> crash ___ Python tracker <https://bugs.python.org/issue37830> ___ ___ Python-bugs-list mai

[issue37793] argparse uses "container object", should be "iterable"

2019-08-08 Thread Eric V. Smith
Eric V. Smith added the comment: Sorry, shireenrao, but I'm closing this. It's entirely my error: I misread the source where it was converting this to a list. The requirement is really that it be something you can iterate over multiple times, and supports "in". I guess &

[issue37793] argparse uses "container object", should be "iterable"

2019-08-08 Thread Eric V. Smith
Eric V. Smith added the comment: Actually, I might have mislead you on this. I now think that plain iterators won't work. I'm still researching this, I'll get back to you on it. I apologize if it turns out I wasted your time. -- ___

[issue37793] argparse uses "container object", should be "iterable"

2019-08-08 Thread Eric V. Smith
Eric V. Smith added the comment: shireenrao: yes, please! As they say, PR's accepted! I'll warn you that I think the only way this could become newcomer-unfriendly is if there are objections that "iterable" is too much jargon for the argparse documentation. But I

[issue37793] argparse uses "container object", should be "iterable"

2019-08-08 Thread Eric V. Smith
New submission from Eric V. Smith : https://docs.python.org/3/library/argparse.html#choices says "These can be handled by passing a container object as the choices keyword argument to add_argument()". I think this should be "iterable" instead. Internally, argparse rea

[issue37783] int returns error (SystemError)

2019-08-07 Thread Eric V. Smith
Eric V. Smith added the comment: This looks like a problem in pandas. If you can distill this down to a short python program that doesn't include any third party libraries, then we can take a look at it. Otherwise, I suggest reporting it on the pandas bug tracker. -- compo

[issue37782] typing.NamedTuple default parameter type issue

2019-08-07 Thread Eric V. Smith
Eric V. Smith added the comment: example_text is not a field, since you're not giving it a type. It's just a normal class member. The only field in the NamedTuple is example_int. You can't specify any other field in the call to MyTestedTuple(). To see this, help(MyTestedTup

[issue37753] 2to3 not handing "<="

2019-08-03 Thread Eric V. Smith
Eric V. Smith added the comment: 2to3 is not designed to turn every valid python2 program into a valid python3 program. You'll have to provide a way to compare GameClock objects. I suggest you look at http://python3porting.com. You should read the whole site, it's a grea

[issue36310] pygettext3.7 Does Not Recognize gettext Calls Within fstrings

2019-07-24 Thread Eric V. Smith
Eric V. Smith added the comment: I've put some more thought in to this, and this is the best I can come up with, using today's Python. The basic idea is that you have a function _f(), which takes a normal (non-f) string. It does a lookup to find the translated string (again, a n

[issue37643] Except clause

2019-07-21 Thread Eric V. Smith
Eric V. Smith added the comment: Yes, this should be discussed on python-ideas first, so I'm closing it here. But to be honest with you, there's really no chance this would get accepted. It's just too easy to do it with existing list comprehension syntax, which is much more

[issue37623] namedtuple integration for importlib.abc.Loader

2019-07-19 Thread Eric V. Smith
Eric V. Smith added the comment: I think using a dataclass here would be easier, since you can control class variables. Is there some reason that your loader must be a namedtuple? Something like: from typing import ClassVar from dataclasses import dataclass @dataclass class MyLoader

[issue37625] Class variable is still accessible after class instance has been overwritten out

2019-07-18 Thread Eric V. Smith
Eric V. Smith added the comment: Also, you might want to search for "python class and instance variables". This one looks decent, although I didn't read it exhaustively: https://howchoo.com/g/nzy0mthhyzl/understanding-class-vs-instance-variab

[issue37625] Class variable is still accessible after class instance has been overwritten out

2019-07-18 Thread Eric V. Smith
Eric V. Smith added the comment: Because variable belongs to the class, and not any instance of the class, you can duplicate this behavior without creating any instances at all: >>> class TestClass(object): ... variable = [] ... >>> TestClass.variable.append(1) >>

[issue37623] namedtuple integration for importlib.abc.Loader

2019-07-18 Thread Eric V. Smith
Change by Eric V. Smith : -- assignee: -> rhettinger nosy: +eric.smith, rhettinger ___ Python tracker <https://bugs.python.org/issue37623> ___ ___ Python-

[issue37519] Three inconsistent module attributes

2019-07-15 Thread Eric V. Smith
Eric V. Smith added the comment: While some of these might be inconsistent (I haven't really looked at it thoroughly yet), I think it might be problematic to change them at this point, since there's no doubt code out there that depends on the curren

[issue37594] re does not honor matching trailing multiple periods

2019-07-14 Thread Eric V. Smith
Eric V. Smith added the comment: Sorry. '\.' will be invalid in the future. I got ahead of myself. $ python3 -Werror -q >>> '\.' File "", line 1 SyntaxError: invalid escape sequence \. Not that it would have affected your issue, so I apologize f

[issue37594] re does not honor matching trailing multiple periods

2019-07-14 Thread Eric V. Smith
Eric V. Smith added the comment: '\.' is an invalid escape sequence. Could you try it with a raw string? Also, it's not really clear to me what you're seeing, vs. what you expect to see. For one example that you think is incorrect, could you show what you get vs. what yo

[issue37568] Misleading UnBoundLocalError on assignment to closure variable

2019-07-12 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks for the great explanation, Steven. And I agree with Josh that changing the exception text would lead to blindly adding nonlocal or global in a superficial attempt to get the code to work. The much more likely problem is already mentioned: reference

[issue37512] Error in the documentation about string concatenation

2019-07-05 Thread Eric V. Smith
Eric V. Smith added the comment: It's my understanding that this is a quality of implementation issue, and that in other (non-CPython) implementations, the run time for repeated concatenation may indeed be quadratic. The optimization in CPython relies on knowing the reference count is

[issue37510] argparse removing more "--" than it should

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

[issue37501] Test failures when CPython is built without docstrings

2019-07-05 Thread Eric V. Smith
Eric V. Smith added the comment: Also surprised by the marked dataclasses tests. I don't see anything there that requires docstrings. See my review on the PR. -- ___ Python tracker <https://bugs.python.org/is

[issue37501] Test failures when CPython is built without docstrings

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

[issue37492] should email.utils.parseaddr treat a@b. as invalid email ?

2019-07-03 Thread Eric V. Smith
Eric V. Smith added the comment: Counterpoint: I just sent an email to "info@info.", and Thunderbird and my MTA (postfix) and my mail relay all accepted it. I guess it's possible that a TLD (especially one of the newer ones) could accept email addresses in the TLD itself. It

[issue37492] should email.utils.parseaddr treat a@b. as invalid email ?

2019-07-03 Thread Eric V. Smith
Eric V. Smith added the comment: RFC 1034 defines absolute domain names as ending with dot: When a user needs to type a domain name, the length of each label is omitted and the labels are separated by dots ("."). Since a complete domain name ends with the root l

[issue37485] dataclass __foo__ methods inheritance is not working

2019-07-02 Thread Eric V. Smith
Eric V. Smith added the comment: I agree with xtreak that this works as designed and isn't a bug. -- assignee: -> eric.smith resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <htt

[issue37479] IntEnum f-string behavior can't be overridden

2019-07-01 Thread Eric V. Smith
Eric V. Smith added the comment: Note that this isn't really related to f-strings, except that they use the __format__ protocol, as does str.__format__. >>> format(myIntEnum.x) '1' -- nosy: +eric.smith ___ Python tracker

[issue37458] ast: Different FormattedValue expressions have same col_offset information

2019-07-01 Thread Eric V. Smith
Eric V. Smith added the comment: I'm working on overhauling how these are calculated. But it's complex, and is taking a while. -- assignee: -> eric.smith nosy: +eric.smith ___ Python tracker <https://bugs.pytho

[issue37357] mbox From line wrongly detected

2019-06-29 Thread Eric V. Smith
Change by Eric V. Smith : -- stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue37357> ___ ___ Python-bugs-list

[issue37422] Documentation on the change of __path__ in Python 3

2019-06-27 Thread Eric V. Smith
Eric V. Smith added the comment: And I see you're not asking for changed behavior, just documentation. But I think it is documented that this is how namespace packages work. -- ___ Python tracker <https://bugs.python.org/is

[issue37422] Documentation on the change of __path__ in Python 3

2019-06-27 Thread Eric V. Smith
Eric V. Smith added the comment: It's a _NamespacePath in 3.7 because there's no __init__.py in the top-level "google" directory, and that makes it a namespace package. I'm not exactly sure why it works in 2.7, frankly. Looking some more: it's because they&#x

[issue37423] 2to3 wraps a already bracketed print statement with another brackets

2019-06-26 Thread Eric V. Smith
Eric V. Smith added the comment: You might also want to look at python-modernize or similar tools. -- resolution: -> not a bug stage: -> resolved status: open -> closed type: -> behavior ___ Python tracker <https://bugs.python

[issue37423] 2to3 wraps a already bracketed print statement with another brackets

2019-06-26 Thread Eric V. Smith
Eric V. Smith added the comment: 2to3 is designed to convert python2 code to python3. It is not designed to work on python3 code. I believe this behavior is correct. -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue37

[issue37422] Documentation on the change of __path__ in Python 3

2019-06-26 Thread Eric V. Smith
Eric V. Smith added the comment: Can you provide a short runnable example that used to work and now does not? And please show any error messages you're seeing. -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/is

[issue37409] relative import_from without parent

2019-06-26 Thread Eric V. Smith
Change by Eric V. Smith : -- nosy: +brett.cannon, eric.smith ___ Python tracker <https://bugs.python.org/issue37409> ___ ___ Python-bugs-list mailing list Unsub

[issue37341] str.format and f-string divergence

2019-06-20 Thread Eric V. Smith
Eric V. Smith added the comment: I've fixed the bpo number in Misc/NEWS.d/3.8.0b1.rst. Thanks for reporting that. -- ___ Python tracker <https://bugs.python.org/is

[issue37341] str.format and f-string divergence

2019-06-19 Thread Eric V. Smith
Eric V. Smith added the comment: > str.format, string.Formatter, and the _string module can only > parse literal keys, not expressions, despite appearing to take the > same syntax as f-strings. I'm happy to contribute code to change > this, but unsure if it's considered

[issue37304] compiler need support in(de)crement operation or all of it should have syntax error.

2019-06-16 Thread Eric V. Smith
Eric V. Smith added the comment: Since ++i already has a meaning, it won't become a syntax error without an extremely good reason, and I don't think this case meets that standard. But as Steven says, if you want to pursue it, you should start with a discussion on py

[issue37241] Item Count Error in Shelf

2019-06-12 Thread Eric V. Smith
Eric V. Smith added the comment: After fixing a missing import (import urllib.request), this is what I get: $ /usr/local/bin/python3.6 pbr37241_Jesse_Bacon.py Fetching nvdcve-1.0-2019.json.gz Storing Gzipped File Loading JSON Content 4275 records 4275 unique records Creating Shelve: cve_2019

[issue37241] Item Count Error in Shelf

2019-06-12 Thread Eric V. Smith
Eric V. Smith added the comment: This still isn't an example we can copy and paste to reproduce, so I'm going to be unable to help you. Sorry. Again: please don't post images, for the reasons I previously stated. -- ___ Python

[issue37241] Item Count Error in Shelf

2019-06-11 Thread Eric V. Smith
Eric V. Smith added the comment: Please do not post images: we can't copy and paste from them, and they're unfriendly to visually impaired users. Can you create code that reproduces this? A small example, with no external dependencies would be best. Please attach the reproducer

[issue37240] Filename http.py breaks calls to urllib

2019-06-11 Thread Eric V. Smith
Eric V. Smith added the comment: Closing as not a bug. This is how python works: you do not want to name a file the same as any standard library module. Use a file name other than http.py. -- components: +Library (Lib) -Windows nosy: +eric.smith -paul.moore, steve.dower, tim.golden

[issue37227] Wrong parse long argument

2019-06-11 Thread Eric V. Smith
Eric V. Smith added the comment: Although note that with allow_abbrev=False, -l will conflict with --long, which I'm not sure is a great design. I'm closing this as not a bug, since it works as documented and there's a workaround (albeit not in 2.7, which is closed

[issue37227] Wrong parse long argument

2019-06-11 Thread Eric V. Smith
Eric V. Smith added the comment: And what is your expected result, and why? -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue37227> ___ ___

[issue37184] suggesting option to raise exception if process exits nonzero in `with subprocess.Popen(...):`

2019-06-06 Thread Eric V. Smith
Eric V. Smith added the comment: I figured as much (but didn't want to lead the witness!). I'm not completely opposed to this. I think the best thing to do is to bring up the proposal on python-ideas, and point here. -- ___ Python track

[issue37184] suggesting option to raise exception if process exits nonzero in `with subprocess.Popen(...):`

2019-06-06 Thread Eric V. Smith
Eric V. Smith added the comment: I think Popen() is just about as complex as anyone wants it to be. Is there something about .run() or .check_call() that keeps you from using them? -- nosy: +eric.smith versions: +Python 3.9 ___ Python tracker

[issue37182] ast - handling new line inside a string

2019-06-06 Thread Eric V. Smith
Eric V. Smith added the comment: There was a recent discussion about this on the bug tracker, but of course now I can't find it. But for an earlier discussion, see issue 25885. The decision was that your expectation that the nodes be distinguishable isn't a design goal of the as

[issue37170] Wrong return value from PyLong_AsUnsignedLongLongMask on PyErr_BadInternalCall

2019-06-06 Thread Eric V. Smith
Eric V. Smith added the comment: As ztane says, the issue isn't the -1, it's the type of the cast. This looks like a legitimate issue to me. -- nosy: +eric.smith resolution: not a bug -> stage: resolved -> patch review status

[issue37163] dataclasses.replace() fails with the field named "obj"

2019-06-05 Thread Eric V. Smith
Eric V. Smith added the comment: Possibly a use for positional-only parameters. Backward compatibility is the question, of course. -- ___ Python tracker <https://bugs.python.org/issue37

[issue35761] Allow dataclasses to be updated in place

2019-06-02 Thread Eric V. Smith
Eric V. Smith added the comment: I'm going to reject this. There's nothing special about dataclasses that would require a feature like this. -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Pyt

[issue33569] dataclasses InitVar does not maintain any type info

2019-06-02 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks for the PR! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> behavior ___ Python tracker <https://bugs.python

[issue33569] dataclasses InitVar does not maintain any type info

2019-06-02 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset 01ee12ba35a333e8a6a25c4153c4a21838e9585c by Eric V. Smith (Augusto Hack) in branch 'master': bpo-33569 Preserve type information with dataclasses.InitVar (GH-8927) https://github.com/python/cpython/commit/01ee12ba35a333e8a6a25c4153c4a2

<    8   9   10   11   12   13   14   15   16   17   >