[issue41517] Enum multiple inheritance loophole

2020-08-10 Thread Eric V. Smith
Eric V. Smith added the comment: Could you provide code which demonstrates the problem? -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue41

[issue41499] logging nested file path

2020-08-07 Thread Eric V. Smith
Eric V. Smith added the comment: You'll need to explain what behavior you're seeing, and how that differs from what you expect. -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue41

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

2020-08-06 Thread Eric V. Smith
Change by Eric V. Smith : -- Removed message: https://bugs.python.org/msg374930 ___ Python tracker <https://bugs.python.org/issue37625> ___ ___ Python-bugs-list m

[issue41482] docstring errors in ipaddress.IPv4Network

2020-08-05 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks, Terry. That was my fault, trying to cherry pick manually. I'm not sure why the original backport failed, and once I did the manual cherry pick as suggested I got called away for real work. As you say, I should have tried deleting the tag and re

[issue41482] docstring errors in ipaddress.IPv4Network

2020-08-05 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset 52f98424a55e14f05dfa7483cc0faf634a61c9ff by Eric L. Frederich in branch 'master': bpo-41482: Fix error in ipaddress.IPv4Network docstring (GH-21736) https://github.com/python/cpython/commit/52f98424a55e14f05dfa7483cc0faf634a61c9ff

[issue41459] pickle.load raises SystemError on malformed input

2020-08-02 Thread Eric V. Smith
Eric V. Smith added the comment: As a rule, we don't put a lot of effort into handling malformed pickle input. Is this causing some practical problem? -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue41

[issue41454] while loop bug on list

2020-08-01 Thread Eric V. Smith
Eric V. Smith added the comment: You're mutating the list while iterating over it, which is causing the behavior you're seeing. This isn't a bug. See for example https://stackoverflow.com/questions/6260089/strange-result-when-removing-item-from-a-list Also, when reporting bugs

[issue41410] Opening a file in binary mode makes a difference on all platforms in Python 3

2020-07-28 Thread Eric V. Smith
Eric V. Smith added the comment: I think deleting the last sentence is sufficient. -- keywords: +newcomer friendly nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue41

[issue41394] Document '_' in interpreter tutorial

2020-07-27 Thread Eric V. Smith
Eric V. Smith added the comment: I think it should be in a new section. But I'd put it as a 16.1.2 and push the others down. It seems like a more important piece of information than shebangs and startup files in interactive mode. Or maybe I'd even put it first. That said, I'm not terribly

[issue41394] Document '_' in interpreter tutorial

2020-07-27 Thread Eric V. Smith
Eric V. Smith added the comment: I think it should be mentioned in https://docs.python.org/3/tutorial/appendix.html#tut-interac, since that's the link that https://docs.python.org/3/tutorial/interpreter.html#interactive-mode uses for it's "for more information" link. This seems li

[issue41411] Improve and consolidate f-strings docs

2020-07-27 Thread Eric V. Smith
Eric V. Smith added the comment: I think this is an excellent idea. The main f-string docs being in a section titled "Lexical Analysis" never seemed very user-friendly. -- ___ Python tracker <https://bugs.python.o

[issue41392] SyntaxError rather than NameError

2020-07-25 Thread Eric V. Smith
Eric V. Smith added the comment: As an example of why it's not possible for the compiler to treat this as a syntax error: I use python for my config files. Before I load these files, I inject names into the builtins, so that the config files can reference them. Some of these are constants

[issue41393] Fix FAQ example to use __import__('functools').reduce

2020-07-25 Thread Eric V. Smith
Eric V. Smith added the comment: I agree that the example is okay as-is. Plus, I can't see us using __import__ in examples. "import" is the preferred way to load modules. Although now that I think about it, maybe __import__ would fit in with the subject "Is it possible to w

[issue41394] Make '_' behavior in shell more clear

2020-07-25 Thread Eric V. Smith
Eric V. Smith added the comment: I haven't checked to see what's documented. I'm sure we'd accept a patch that improves the documentation if it's lacking. -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue41

[issue41382] print() unpredictable behaviour

2020-07-24 Thread Eric V. Smith
Eric V. Smith added the comment: It would help if you could pare this down to a simpler example, hopefully removing the '$'. For example, does the problem still occur if you '$'s? What if you make all of the non-numeric strings 1 character long? What if you delete the non-numeric strings

[issue41377] memoryview of str (unicode)

2020-07-23 Thread Eric V. Smith
Eric V. Smith added the comment: I don't think there's a python-level api to find out the "kind", but I can't say I've looked closely. And there are no doubt problems with doing so and alternate implementations other than CPython. I'm not sure we want to expose this implementat

[issue41377] memoryview of str (unicode)

2020-07-23 Thread Eric V. Smith
Eric V. Smith added the comment: > AIUI (though I could be misunderstanding things) `str` objects do use some > kind of typed array of unicode characters (either 16-bit narrow or 32-bit > wide). It's somewhat more complicated. The string data is stored differently depending on th

[issue41337] strangnedd with the parser

2020-07-21 Thread Eric V. Smith
Eric V. Smith added the comment: I'm going to close this as not a python bug. If someone gets some evidence to the contrary, we can re-open it. -- resolution: -> not a bug stage: -> resolved status: open -> closed type: -> behavior __

[issue41337] strangnedd with the parser

2020-07-19 Thread Eric V. Smith
Eric V. Smith added the comment: This doesn't appear to be a Python bug, but rather an issue with how you're using PyTorch. I suggest you ask for help on a PyTorch support forum, or maybe try StackOverflow. -- nosy: +eric.smith status: open -> pend

[issue41312] add !p to pprint.pformat() in str.format() an f-strings

2020-07-16 Thread Eric V. Smith
Eric V. Smith added the comment: I suggest you discuss this on python-ideas, since we'll need to reach consensus there, first. -- components: +Interpreter Core -IO, Library (Lib) ___ Python tracker <https://bugs.python.org/issue41

[issue41312] add !p to pprint.pformat() in str.format() an f-strings

2020-07-16 Thread Eric V. Smith
Eric V. Smith added the comment: I agree with Raymond that it's unlikely that this will work, as a practical matter. In addition to the other problems mentioned, there's the issue of the many parameters to control pprint. And I agree with pprint, or a replacement, needing a redesign. I

[issue41310] micro-optimization: increase our float parsing speed by Nx

2020-07-16 Thread Eric V. Smith
Eric V. Smith added the comment: I don't think we'd want to fall back to strtod, but rather to the code we already use (Gay's). So this would increase our maintenance burden. I'm also not convinced that we actually spend a lot of time in this code, but of course profiling would be needed

[issue41313] sys.setrecursionlimit: OverflowError still raised when int limited in sys.maxsize

2020-07-16 Thread Eric V. Smith
Change by Eric V. Smith : -- title: OverflowError still raised when int limited in sys.maxsize -> sys.setrecursionlimit: OverflowError still raised when int limited in sys.maxsize ___ Python tracker <https://bugs.python.org/issu

[issue41310] micro-optimization: increase our float parsing speed by Nx

2020-07-15 Thread Eric V. Smith
Change by Eric V. Smith : -- nosy: +eric.smith, mark.dickinson ___ Python tracker <https://bugs.python.org/issue41310> ___ ___ Python-bugs-list mailing list Unsub

[issue41286] Built-in platform module does not offer to check for processor instructions

2020-07-14 Thread Eric V. Smith
Eric V. Smith added the comment: I think your best bet will be to write a small C extension to find out what's supported by the processor. -- ___ Python tracker <https://bugs.python.org/issue41

[issue41045] f-string's "debug" feature is undocumented

2020-07-13 Thread Eric V. Smith
Eric V. Smith added the comment: @rishi93: yes, please do! -- ___ Python tracker <https://bugs.python.org/issue41045> ___ ___ Python-bugs-list mailing list Unsub

[issue41289] '%' character in help= for argparse causes ValueError: incomplete format

2020-07-13 Thread Eric V. Smith
Eric V. Smith added the comment: It's using normal %-formatting, so the rules applied are in https://docs.python.org/3/library/stdtypes.html#printf-style-string-formatting The last line of the last table in that section mentions literal % characters. I realize it's sort of hard to dig

[issue41289] '%' character in help= for argparse causes ValueError: incomplete format

2020-07-12 Thread Eric V. Smith
Eric V. Smith added the comment: Did you try doubling the % char? help='%%-age of the value' -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue41

[issue41286] Built-in platform module does not offer to check for processor instructions

2020-07-12 Thread Eric V. Smith
Eric V. Smith added the comment: What would you use this information for, if it were available from Python code? -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue41

[issue41272] New clause in FOR and WHILE instead of ELSE

2020-07-10 Thread Eric V. Smith
Eric V. Smith added the comment: You should bring this up on the python-ideas mailing list so that it gets more visibility. -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue41

[issue41256] activate script created by venv is not smart enough

2020-07-10 Thread Eric V. Smith
Eric V. Smith added the comment: Changing versions to those that are currently receiving support. -- nosy: +eric.smith versions: -Python 3.5, Python 3.6, Python 3.7 ___ Python tracker <https://bugs.python.org/issue41

[issue41253] unittest -h shows a flag -s but it doesn't work

2020-07-10 Thread Eric V. Smith
Eric V. Smith added the comment: This appears to just be a misunderstanding: -s is a flag to "unittest discover", not to "unittest" itself. I think this is clear from the help text, so I'm closing this. If I'm incorrect, let me know. -- nosy: +eric.smith resol

[issue41267] Attribute error: Pandas module doesn't have 'Plotting' attribute

2020-07-10 Thread Eric V. Smith
Eric V. Smith added the comment: This bug tracker is for reporting bugs in python, not for getting help using python. I suggest asking for help on the python-list mailing list: https://mail.python.org/mailman/listinfo/python-list Or, since this sounds like you're having problems

[issue41145] EmailMessage.as_string is altering the message state and actually fix bugs

2020-07-10 Thread Eric V. Smith
Change by Eric V. Smith : -- components: +email nosy: +barry, r.david.murray ___ Python tracker <https://bugs.python.org/issue41145> ___ ___ Python-bugs-list m

[issue41199] Docstring convention not followed for dataclasses documentation page

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

[issue41254] Add to/from string methods to datetime.timedelta

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

[issue41250] Number separators in different places

2020-07-09 Thread Eric V. Smith
Eric V. Smith added the comment: The formatting specification language is already complicated enough without adding even more to it. As PEP 378 says "It is not the goal to replace the locale module, to perform internationalization tasks, or accommodate every possible convention."

[issue33754] f-strings should be part of the Grammar

2020-07-08 Thread Eric V. Smith
Change by Eric V. Smith : -- versions: +Python 3.10 -Python 3.8 ___ Python tracker <https://bugs.python.org/issue33754> ___ ___ Python-bugs-list mailin

[issue41240] Use the same kind of quotation mark in f-string

2020-07-08 Thread Eric V. Smith
Eric V. Smith added the comment: This is a limitation of the parser: the entire f-string is first evaluated as a string. Just as 'Hey, {' this quote is wrong.'}' or r'Hey, {' this quote is wrong.'}' are not valid strings, neither is f'Hey, {' this quote is wrong.'}' See issue 33754

[issue41216] eval don't load local variable in dict and list comprehensions.

2020-07-06 Thread Eric V. Smith
Eric V. Smith added the comment: Agreed that this is a duplicate, so I'm closing it. -- nosy: +eric.smith resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> eval() function in List Comprehension

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

2020-07-04 Thread Eric V. Smith
Eric V. Smith added the comment: I think waiting until we decide what to do with the parser makes sense. This problem has been around for a while, and while it's unfortunate I don't think it's worth heroic measures to fix. -- ___ Python tracker

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

2020-07-04 Thread Eric V. Smith
Eric V. Smith added the comment: I still see this problem with 3.10, which I thought might have fixed this. @lys.nikolaou: any ideas on this? -- components: +Interpreter Core -Library (Lib) nosy: +lys.nikolaou versions: +Python 3.10 -Python 3.7, Python 3.8

[issue41199] Docstring convention not followed for dataclasses documentation page

2020-07-03 Thread Eric V. Smith
Change by Eric V. Smith : -- keywords: +newcomer friendly -patch ___ Python tracker <https://bugs.python.org/issue41199> ___ ___ Python-bugs-list mailin

[issue41199] Docstring convention not followed for dataclasses documentation page

2020-07-03 Thread Eric V. Smith
Change by Eric V. Smith : -- pull_requests: -20437 ___ Python tracker <https://bugs.python.org/issue41199> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41170] Use strnlen instead of strlen when the size i known.

2020-06-30 Thread Eric V. Smith
New submission from Eric V. Smith : Is strnlen() supported by all of the compilers we care about? -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue41

[issue41004] Hash collisions in IPv4Interface and IPv6Interface

2020-06-30 Thread Eric V. Smith
Eric V. Smith added the comment: Ned: what are your thoughts on backporting this as a security issue? https://nvd.nist.gov/vuln/detail?vulnId=CVE-2020-14422 -- nosy: +ned.deily ___ Python tracker <https://bugs.python.org/issue41

[issue41004] Hash collisions in IPv4Interface and IPv6Interface

2020-06-29 Thread Eric V. Smith
Change by Eric V. Smith : -- assignee: -> eric.smith resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python

[issue41004] Hash collisions in IPv4Interface and IPv6Interface

2020-06-29 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset b30ee26e366bf509b7538d79bfec6c6d38d53f28 by Ravi Teja P in branch 'master': bpo-41004: Resolve hash collisions for IPv4Interface and IPv6Interface (GH-21033) https://github.com/python/cpython/commit/b30ee26e366bf509b7538d79bfec6c6d38d53f28

[issue41084] Signify that a SyntaxError comes from an fstring in the error message

2020-06-27 Thread Eric V. Smith
Eric V. Smith added the comment: AFAIK, we don't guarantee the stability of error messages, so I think backporting is fine. It's all the better that this is just prefixing something to an existing error message. -- ___ Python tracker <ht

[issue41132] F-String parser uses raw allocator

2020-06-27 Thread Eric V. Smith
Eric V. Smith added the comment: I think backporting to 3.8 would be okay. -- ___ Python tracker <https://bugs.python.org/issue41132> ___ ___ Python-bugs-list m

[issue41132] F-String parser uses raw allocator

2020-06-26 Thread Eric V. Smith
Eric V. Smith added the comment: I don't think I put any thought into it. It was probably just in an example I was copying from. I'm not familiar with the difference between those allocators. Why would pymalloc be preferred? -- ___ Python

[issue41126] Running test suite gives me - python.exe(14198, 0x114352dc0) malloc: can't allocate region

2020-06-26 Thread Eric V. Smith
Change by Eric V. Smith : -- components: +macOS nosy: +ned.deily, ronaldoussoren ___ Python tracker <https://bugs.python.org/issue41126> ___ ___ Python-bug

[issue41084] Signify that a SyntaxError comes from an fstring in the error message

2020-06-22 Thread Eric V. Smith
Eric V. Smith added the comment: I think it's a good idea. My only reservation would be: if the parsing of f-strings is moved into the parser, would it be possible to maintain the error new messages? -- ___ Python tracker <ht

[issue41081] Exclude __pycache__ directories from backups using CACHEDIR.TAG

2020-06-22 Thread Eric V. Smith
Eric V. Smith added the comment: To spoil it for other readers: the linked page says to create a file named CACHEDIR.TAG with a specific first line. -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue41

[issue41064] f-string SyntaxError gives offset within fake line, other issues

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

[issue41045] f-string's "debug" feature is undocumented

2020-06-19 Thread Eric V. Smith
New submission from Eric V. Smith : The feature of f-strings using '=' for "debugging" formatting is not documented. >>> foo = 'bar' >>> f'{foo=}' "foo='bar'" I'm not sure where this should fit in to the documentation, but it needs to be in there s

[issue41042] import searches for package even after file was found successfully

2020-06-19 Thread Eric V. Smith
Eric V. Smith added the comment: You should just be using "import index". By using "import index.py", you're telling the interpreter to first import index, execute the code in it, then look for a sub-module named "py" (full name: index.py). Since no such

[issue41042] import searches for package even after file was found successfully

2020-06-19 Thread Eric V. Smith
Eric V. Smith added the comment: Please provide a small script that demonstrates this behavior. -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue41

[issue41041] Multiprocesing Pool borken on macOS REPL

2020-06-19 Thread Eric V. Smith
Eric V. Smith added the comment: To be unpickle-able, the code for f needs to be imported, which it can't be from the repl. Windows has this same issue, due to also not using fork(). >From >https://docs.python.org/3/library/pickle.html#what-can-be-pickled-and-unpickled: > "Thu

[issue41004] Hash collisions in IPv4Interface and IPv6Interface

2020-06-19 Thread Eric V. Smith
Eric V. Smith added the comment: Changing versions to where the fix would be applied. -- versions: -Python 3.5, Python 3.6, Python 3.7 ___ Python tracker <https://bugs.python.org/issue41

[issue41004] Hash collisions in IPv4Interface and IPv6Interface

2020-06-17 Thread Eric V. Smith
Change by Eric V. Smith : -- keywords: +easy ___ Python tracker <https://bugs.python.org/issue41004> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41004] Hash collisions in IPv4Interface and IPv6Interface

2020-06-17 Thread Eric V. Smith
Eric V. Smith added the comment: Good catch. Your approach seems like a good one. -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue41

[issue40984] re.compile's repr truncates patterns at 200 characters

2020-06-16 Thread Eric V. Smith
Eric V. Smith added the comment: Re-opening this because issue39949 is about match objects, not compiled re objects. Still, I don't think the repr "rule" about being eval-able is hard and fast. Although changing the repr to be in brackets wouldn't be unreasonable just to drive

[issue39949] truncating match in regular expression match objects repr

2020-06-16 Thread Eric V. Smith
Eric V. Smith added the comment: Ah, I see. I missed that this issue was only about match objects. I apologize for the confusion. That being the case, I'll re-open the other issue. -- ___ Python tracker <https://bugs.python.org/issue39

[issue39949] truncating match in regular expression match objects repr

2020-06-16 Thread Eric V. Smith
Eric V. Smith added the comment: There was a discussion in issue40984 that the repr must be eval-able. I don't feel very strongly about this, mainly because I don't think anyone ever does eval(repr(some_regex)). I'd be slightly sympathetic to wanting the eval to fail if the repr had

[issue40984] re.compile's repr truncates patterns at 200 characters

2020-06-16 Thread Eric V. Smith
Eric V. Smith added the comment: Any change to the repr should take place on the other issue. I don't feel very strongly that the repr must be eval-able, but in any event it should be raised on issue39949 if you feel strongly about it. I do think it's reasonable to say that if the repr

[issue39949] truncating match in regular expression match objects repr

2020-06-16 Thread Eric V. Smith
Change by Eric V. Smith : -- components: +Regular Expressions -Library (Lib) nosy: +ezio.melotti, mrabarnett resolution: not a bug -> stage: resolved -> needs patch status: closed -> open ___ Python tracker <https://bugs.python.or

[issue33881] dataclasses should use NFKC to find duplicate members

2020-06-13 Thread Eric V. Smith
Eric V. Smith added the comment: I agree with Raymond. There's no real harm being caused here. -- resolution: -> wont fix stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue40925] Remove redundant macros used for stack manipulation in interpreter

2020-06-09 Thread Eric V. Smith
Eric V. Smith added the comment: What type of changes are you proposing to make? -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue40

[issue40888] Add close method to queue

2020-06-06 Thread Eric V. Smith
Eric V. Smith added the comment: You should probably bring this up on the python-ideas mailing list. -- nosy: +eric.smith type: -> enhancement versions: +Python 3.10 ___ Python tracker <https://bugs.python.org/issu

[issue40825] Add a "strict" parameter to csv.writer and csv.DictWriter

2020-06-02 Thread Eric V. Smith
Eric V. Smith added the comment: I wouldn't have a problem with isinstance(obj, str) for a string check in strict mode. If you want to write something like a Path, convert it to a string yourself. That's exactly the behavior I'd like enforced by strict: only accept numbers and actual

[issue17005] Add a topological sort algorithm

2020-05-31 Thread Eric V. Smith
Eric V. Smith added the comment: I'd prefer a new module just for this. As for names, I like toposort over topsort. I already have a library on PyPI named toposort. Personally, I don't have a problem with the stdlib taking over that name, and I'd just deprecate mine at 3.9, or whatever

[issue40825] Add a "strict" parameter to csv.writer and csv.DictWriter

2020-05-31 Thread Eric V. Smith
Eric V. Smith added the comment: That seems like a good plan. -- ___ Python tracker <https://bugs.python.org/issue40825> ___ ___ Python-bugs-list mailin

[issue40825] Add a "strict" parameter to csv.writer and csv.DictWriter

2020-05-31 Thread Eric V. Smith
Eric V. Smith added the comment: Losing Decimal would be a problem. I use those a lot in CSV files, and I assume others do, too. -- ___ Python tracker <https://bugs.python.org/issue40

[issue40825] Add a "strict" parameter to csv.writer and csv.DictWriter

2020-05-30 Thread Eric V. Smith
Eric V. Smith added the comment: I guess an isinstance check against numbers.Number would be the best way to check if an argument is a number. I'm not sure how convenient that is from C code. -- ___ Python tracker <https://bugs.python.

[issue40825] Add a "strict" parameter to csv.writer and csv.DictWriter

2020-05-30 Thread Eric V. Smith
Eric V. Smith added the comment: For backward compatibility, strict would have to default to False. -- ___ Python tracker <https://bugs.python.org/issue40

[issue40762] Writing bytes using CSV module results in b prefixed strings

2020-05-30 Thread Eric V. Smith
Eric V. Smith added the comment: I've created issue40825 for adding a "strict" parameter. -- ___ Python tracker <https://bugs.python.org/issue40762> ___ __

[issue40825] Add a "strict" parameter to csv.writer and csv.DictWriter

2020-05-30 Thread Eric V. Smith
New submission from Eric V. Smith : Currently, the csv library calls str() on each value it writes. This can lead to surprising behavior, see issue40762 for example. On the other hand, for writing the documentation says that the values must be strings or numbers. The proposed "s

[issue40796] dataclasses.make_dataclass: Exception when called with different field orders

2020-05-27 Thread Eric V. Smith
Eric V. Smith added the comment: No problem! It can't reorder fields, because you might not be passing them by name. There's some discussion about requiring keyword-only parameters, in which case what you're doing would work (as long as they were keyword-only params). -- resolution

[issue40796] dataclasses.make_dataclass: Exception when called with different field orders

2020-05-27 Thread Eric V. Smith
Eric V. Smith added the comment: Isn't this error that you're providing a field without a default value after one with a default value? What's the exception look like? -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue40

[issue40794] dataclass signatures and docstrings w/future-annotations

2020-05-27 Thread Eric V. Smith
Eric V. Smith added the comment: I see. Not sure how I overlooked that. Thanks. At first blush, I think your approach would work. -- ___ Python tracker <https://bugs.python.org/issue40

[issue40794] dataclass signatures and docstrings w/future-annotations

2020-05-27 Thread Eric V. Smith
Eric V. Smith added the comment: Hmm. That's a regression, at least from 3.7, which is the only version I have ready access to: $ python3 Python 3.7.3 (default, Mar 27 2019, 13:36:35) [GCC 9.0.1 20190227 (Red Hat 9.0.1-0.8)] on linux Type "help", "copyright", "credi

[issue40762] Writing bytes using CSV module results in b prefixed strings

2020-05-27 Thread Eric V. Smith
Eric V. Smith added the comment: > Short of outright banning the use of bytes (raise a TypeError), I think > the current behaviour is least-worst. I agree. I'd like to see the TypeError raised for everything that's not a string or number (since the docs say that's what's ac

[issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.10

2020-05-26 Thread Eric V. Smith
Eric V. Smith added the comment: To my knowledge, dataclasses works with `from __future__ import annotations`. If there are specific examples of problems, I'd like to hear about it: please open a separate issue. There is a hack (discussed at PyCon 2018 with all of the relevant players

[issue40780] float.__format__() handles trailing zeros inconsistently in “general” format

2020-05-26 Thread Eric V. Smith
Change by Eric V. Smith : -- title: str.format() handles trailing zeros inconsistently in “general” format -> float.__format__() handles trailing zeros inconsistently in “general” format ___ Python tracker <https://bugs.python.org/issu

[issue40780] str.format() handles trailing zeros inconsistently in “general” format

2020-05-26 Thread Eric V. Smith
Eric V. Smith added the comment: I think I'd just do 3.9 and master. It does seem subtle for a minor release, when people are less likely to be looking at the release notes. -- ___ Python tracker <https://bugs.python.org/issue40

[issue40780] str.format() handles trailing zeros inconsistently in “general” format

2020-05-26 Thread Eric V. Smith
Eric V. Smith added the comment: For completeness, here's the output using just format, which I prefer over str.format because there's less going on: it removes all of the str.format machinery and basically directly calls obj.__format__. >>> format(1504, '.3g') '1.5e+03' >&g

[issue40780] str.format() handles trailing zeros inconsistently in “general” format

2020-05-26 Thread Eric V. Smith
Change by Eric V. Smith : -- nosy: +mark.dickinson ___ Python tracker <https://bugs.python.org/issue40780> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40780] str.format() handles trailing zeros inconsistently in “general” format

2020-05-26 Thread Eric V. Smith
Eric V. Smith added the comment: FWIW, which is probably not much with ".g" formatting, this is how Decimal behaves: >>> from decimal import Decimal as D >>> format(D(1504), '.3g') '1.50e+3' >>> format(D(1505), '.3g') '1.50e+3' >>> format(D(1506

[issue40780] str.format() handles trailing zeros inconsistently in “general” format

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

[issue39673] Map errno==ETIME to TimeoutError

2020-05-26 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks for clarifying, Giampaolo. I'll accept this PR once it's cleaned up. -- ___ Python tracker <https://bugs.python.org/issue39

[issue40760] Dictionary comprehension using older division behavior

2020-05-24 Thread Eric V. Smith
Eric V. Smith added the comment: That's not what I see: $ python3.8 Python 3.8.0b4 (default, Sep 15 2019, 15:56:44) [GCC 7.4.0] on cygwin Type "help", "copyright", "credits" or "license" for more information. >>> some_dict = {3:4} &

[issue40730] Odd sentence in 3.9 What's New

2020-05-22 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks, @DahlitzFlorian! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10 ___ Python tracker <https://bugs.python.or

[issue40730] Odd sentence in 3.9 What's New

2020-05-22 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset 983b17ca1319adf9f06d5f2779a44450241eba54 by Miss Islington (bot) in branch '3.9': bpo-40730: Remove redundant 'to' (GH-20316) (GH-20318) https://github.com/python/cpython/commit/983b17ca1319adf9f06d5f2779a44450241eba54

[issue40730] Odd sentence in 3.9 What's New

2020-05-22 Thread Eric V. Smith
Eric V. Smith added the comment: Yes, please go ahead. -- ___ Python tracker <https://bugs.python.org/issue40730> ___ ___ Python-bugs-list mailing list Unsub

[issue40730] Odd sentence in 3.9 What's New

2020-05-22 Thread Eric V. Smith
New submission from Eric V. Smith : https://docs.python.org/3.9/whatsnew/3.9.html#optimizations has this sentence: "Unlike to the := operator this idiom does not leak a variable to the outer scope.". I'm not exactly sure what it should be. Probably the first "to"

[issue40642] Cpython "pystate.h" subdirectory wrong

2020-05-20 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks for the info. It's weird that this is just showing up for you, and I assume works everywhere else. How are you invoking the compiler, via make, or something else? And, what's the gcc command line look like when this specific file fails? I grepped

[issue40693] pathlib.Path will be broken with os.chdir command.

2020-05-20 Thread Eric V. Smith
Eric V. Smith added the comment: https://stackoverflow.com/questions/7116889/is-module-file-attribute-absolute-or-relative and https://bugs.python.org/issue18416 might help explain behavior. I agree it's working as designed. -- nosy: +eric.smith

[issue40685] IDLE not working

2020-05-19 Thread Eric V. Smith
Eric V. Smith added the comment: This is almost surely a problem in your environment, and not a bug in python. This bug tracker is for reporting bugs in python. I suggest you look for help elsewhere, such as the python-list mailing list (https://mail.python.org/mailman/listinfo/python-list

[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> ___ ___

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