Eric V. Smith added the comment:
I'm going to close this. I agree with Serhiy that it's pushing f-strings too
far.
If you really want to pursue this, you'll need to specify the semantics much
more clearly, and then bring it up on the python-ideas mailing list. But I
don
Change by Eric V. Smith :
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue43697>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric V. Smith added the comment:
I don't see how this would be possible in general. What would you do with a
function call that has side effects?
f'{a()+b+c=}'
?
You'd end up calling a() twice, or inventing your own expression evaluator.
New submission from Eric V. Smith :
Please provide example code that we can run which demonstrates the problem.
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue43
Eric V. Smith added the comment:
I think it's PyMethod_Type.
--
nosy: +eric.smith, rhettinger
___
Python tracker
<https://bugs.python.org/issue43677>
___
___
Change by Eric V. Smith :
--
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue43675>
___
___
Python-bugs-list
Eric V. Smith added the comment:
I agree with Raymond. We can't make a change that would modify existing program
output. Which is unfortunate, but such is life.
And I'd prefer to see groupings of 5 on the right, but I realize I might be in
th
Eric V. Smith added the comment:
New changeset 9a8e0780247acb256dd8b04c15b3dd0f59ef2fe1 by Miss Islington (bot)
in branch '3.9':
bpo-31907: [doc] clarify that str.format() does not support arbitrary
expressions (GH-25053) (GH-25055)
https://github.com/python/cpyt
Change by Eric V. Smith :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Eric V. Smith added the comment:
New changeset fb1d01b9630b5069fe975f16e07a027d90b89434 by Irit Katriel in
branch 'master':
bpo-31907: [doc] clarify that str.format() does not support arbitrary
expressions (#25053)
https://github.com/python/cpyt
Eric V. Smith added the comment:
> The syntax is related to that of formatted string literals, but it is less
> sophisticated and, in particular, does not support arbitrary expressions.
That seems fine to me.
--
___
Python tracker
Eric V. Smith added the comment:
If we do anything for float, we should do the same for decimal.Decimal.
--
___
Python tracker
<https://bugs.python.org/issue43
Change by Eric V. Smith :
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue43624>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric V. Smith added the comment:
Same advice as issue 43616: please provide an example we can run.
This most likely a problem with how you're using lxml, and not a bug in python.
But since we can't test it, we can't know for sure.
--
no
Eric V. Smith added the comment:
The parens are added in fstring_compile_expr at
https://github.com/python/cpython/blob/9feae41c4f04ca27fd2c865807a5caeb50bf4fc4/Parser/string_parser.c#L391
I don't recall if this is really only a "skip leading whitespace" problem, or
if the
Change by Eric V. Smith :
--
keywords: +easy -patch
stage: patch review -> needs patch
___
Python tracker
<https://bugs.python.org/issue43558>
___
___
Python-
Change by Eric V. Smith :
--
pull_requests: -23731
___
Python tracker
<https://bugs.python.org/issue43558>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Eric V. Smith :
--
pull_requests: -23730
___
Python tracker
<https://bugs.python.org/issue43558>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric V. Smith added the comment:
Are you using a 64-bit version of python? What is sys.maxsize?
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue43
New submission from Eric V. Smith :
https://docs.python.org/3/library/dataclasses.html#post-init-processing should
mention that if you need to call super().__init__, you should do it in
__post_init__. Dataclasses cannot know what parameters to pass to the super
class's __init__, so y
Eric V. Smith added the comment:
I'd add a note to the docs about it, then open a feature request to change the
behavior. You could turn this issue into a documentation fix.
Unfortunately I don't know if there's a core dev who pays attention to the XML
parsers. But I can pr
Eric V. Smith added the comment:
I'm +0.5. Every time this bites me, I apply the same solution, so you're
probably right that str.join should just do the work itself. And it's no doubt
more performant that way, anyway.
And I've probably got some code that's jus
Change by Eric V. Smith :
--
keywords: +patch
pull_requests: +23671
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/24909
___
Python tracker
<https://bugs.python.org/issu
Eric V. Smith added the comment:
Closing this in favor of issue 43532, which has a slightly elaborated approach.
--
resolution: -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder: -> Add keyword-only fields to
New submission from Eric V. Smith :
The idea is that a keyword-only field becomes a keyword-only argument to
__init__().
For the proposal and a discussion, see
https://mail.python.org/archives/list/python-id...@python.org/message/FI6KS4O67XDEIDYOFWCXMDLDOSCNSEYG/
The @dataclass decorator
Eric V. Smith added the comment:
I think that's good text, once the enhancement is made. But for existing
versions of python, shouldn't we just document that the text might come back in
chunks?
I don't have a feel for what the
Eric V. Smith added the comment:
I'm going to close this. @xmm: If you can provide more information showing that
this is a bug in Python or its build process, please re-open this issue.
--
resolution: -> not a bug
stage: -> resolved
status: ope
Eric V. Smith added the comment:
Thanks, that's very helpful. Does this only affect content text?
This should definitely be documented.
As far as changing it, I think the best thing to do is say that if the context
text is less than some size (I don't know, maybe 1MB?) that it
Eric V. Smith added the comment:
Could you give an example (using a list of callbacks and values or something)
that shows how it's behaving that you think is problematic? That's the part I'm
not understanding. This doesn't have to be a real example, just show what the
us
Eric V. Smith added the comment:
You’ve not told us the behavior you see or the behavior you expect, so we can’t
tell if this is a bug in python.
But it’s in all likelihood not a bug. If you want to get help with your code, I
suggest asking on the python-list mailing list or maybe
Eric V. Smith added the comment:
I think we could document where a "quoted string of length 8 characters would
be returned in multiple pieces" occurs. Which API is that?
If we change that, and if we call it an enhancement instead of a bug fix, then
it can't be backported. It
Eric V. Smith added the comment:
I'm leaning toward accepting this on the condition that it only be invoked for
dataclasses where __repr__ was the version generated by @dataclass. And also
that it use the same fields that the generated __repr__ would use (basically
skipping repr=
Eric V. Smith added the comment:
Perhaps you could open a documentation bug? I think specific examples of where
the documentation is wrong, and how it could be improved, would be helpful.
Thanks!
--
nosy: +eric.smith
___
Python tracker
<ht
Eric V. Smith added the comment:
"git blame" will help you identify the authors. It looks there are 5 people
involved: Brett, Antoine, Nick, Eric Snow, and Dino.
--
___
Python tracker
<https://bugs.python.o
Change by Eric V. Smith :
--
nosy: +brett.cannon, eric.smith
___
Python tracker
<https://bugs.python.org/issue43477>
___
___
Python-bugs-list mailing list
Unsub
Change by Eric V. Smith :
--
status: open -> pending
___
Python tracker
<https://bugs.python.org/issue43471>
___
___
Python-bugs-list mailing list
Unsubscrib
Eric V. Smith added the comment:
You're probably missing needed dependencies. For example, see
https://stackoverflow.com/questions/12806122/missing-python-bz2-module
If you look at the output of make, you should be able to see that _bz2 wasn't
built.
--
nosy: +
Change by Eric V. Smith :
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue43463>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric V. Smith added the comment:
David:
If you could give us an example showing the inputs, the actual outputs, and how
they differ from what you expect, that would be helpful. Otherwise it's a lot
of guessing on our part.
--
nosy: +eric.
Eric V. Smith added the comment:
Thanks!
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Eric V. Smith added the comment:
New changeset 6d4273356764a3837c914b2aced7a668c534e0be by Miss Islington (bot)
in branch '3.8':
bpo-43415: Fix typo on dataclasses.rst (GH-24789) (GH-24791)
https://github.com/python/cpython/commit/6d4273356764a3837c914b2aced7a6
Eric V. Smith added the comment:
New changeset fb3b0310305acdfad7c26705c2ee9a8712a43cf4 by Miss Islington (bot)
in branch '3.9':
bpo-43415: Fix typo on dataclasses.rst (GH-24789) (GH-24790)
https://github.com/python/cpython/commit/fb3b0310305acdfad7c26705c2ee9a
Change by Eric V. Smith :
--
assignee: docs@python -> eric.smith
title: Typo -> Typo in dataclasses documentation
___
Python tracker
<https://bugs.python.org/i
Eric V. Smith added the comment:
New changeset 0554044ddccdb7bf1fa4a8bc880e7a7b59f6479c by Guilherme Martins
Crocetti in branch 'master':
bpo-43415: Fix typo on dataclasses.rst (#24789)
https://github.com/python/cpython/commit/0554044ddccdb7bf1fa4a8bc880e7a
Change by Eric V. Smith :
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue43415>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric V. Smith added the comment:
I think this is all about: should inspect.signature() resolve string
annotations into actual types (via get_type_hints, or whatever)? I don't use
expect much, so I can't offer an opinion there.
--
Eric V. Smith added the comment:
Was
def createD(D):
supposed to be:
def createD(d):
?
Not that that changes your problem. I just want to understand the exact issue.
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue43
Eric V. Smith added the comment:
Can you show the values of “expected” and “actual” for both the failures and
successes?
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue43
Eric V. Smith added the comment:
You're going to get more help by posting your question elsewhere. This isn't a
forum where we can help you debug your code: it's for reporting bugs in Python.
You might try https://discuss.python.org/c/users/, or maybe the python-list
mail
Eric V. Smith added the comment:
As a rule we don't try and document every exception that can be raised. I could
go either way on documenting encoding errors with the json module, although it
seems pretty clear that an encoding error would be possible in this case.
--
ass
Change by Eric V. Smith :
--
resolution: -> not a bug
___
Python tracker
<https://bugs.python.org/issue43326>
___
___
Python-bugs-list mailing list
Unsubscrib
Eric V. Smith added the comment:
I don't think there's a problem with Python here.
The complaint seems to be one or more of:
- The creating software allowed a newline to be in the filename.
- Windows allows the creation of filenames with newlines.
- The Windows UI doesn't h
Change by Eric V. Smith :
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue43257>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Eric V. Smith :
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue43227>
___
___
Eric V. Smith added the comment:
Yes, they're prohibited anywhere inside of the braces {}.
This might be relaxed in the future, but through 3.9 it's still enforced.
--
___
Python tracker
<https://bugs.python.o
Eric V. Smith added the comment:
Thanks. I’m guessing the space in the path is causing a problem.
--
___
Python tracker
<https://bugs.python.org/issue43
Eric V. Smith added the comment:
Where did you install Python from?
Before you've activated the virtual env, please run "echo $PATH".
After you've activated the virtual env, can you run "ls -l .venv/bin" and "echo
$PATH"?
--
__
Eric V. Smith added the comment:
Please do not post screen captures. It makes it difficult for users with
accessibility software and it makes it hard for people trying to help you to
copy and paste exactly what you've tried.
I'm unable to duplicate your problem.
[~]$ ps
Eric V. Smith added the comment:
It's hard to tell because you didn't show the whole program, but this looks
like a mutable default argument problem. Basically you're changing the default
value in a different call to Row().
https://docs.python.org/3/faq/programming.html#
Eric V. Smith added the comment:
If you could demonstrate the problem without numpy, then we could probably help
you here. I don't know much about numpy.
--
___
Python tracker
<https://bugs.python.org/is
Eric V. Smith added the comment:
Would you infer it to be ‘?’ or ‘*’?
I’m not completely opposed, but I haven’t thought it through or looked at the
code.
--
___
Python tracker
<https://bugs.python.org/issue43
Eric V. Smith added the comment:
I agree with @hroncok, and maybe we could tweak the message to say
FileNotFoundError: [Errno 2] No such file or directory: while executing
'./demo'. Maybe bad shebang, or missing file?
Or something to that effect. I realize that listing all poss
Eric V. Smith added the comment:
Providing a default value does not imply setting nargs, so you need to specify
both. I think it's not clear what nargs would default to, if you wanted to
change the behavior if default= is supplied.. In your example you probably want
nargs=
Eric V. Smith added the comment:
This looks like a numpy usage question, not a python bug. I suggest you ask on
Stackoverflow or a numpy user forum.
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue43
Change by Eric V. Smith :
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue43130>
___
___
Eric V. Smith added the comment:
I suggest making no change here, except maybe documenting it somewhere.
Removing the filename would make this problem even harder to diagnose. And
adding additional code to an error condition just increases the chance of
something failing. The error
Eric V. Smith added the comment:
This isn't a forum for helping users with questions about Python, it's for
reporting bugs in Python.
I suggest you ask this question on the python-list mailing list:
https://mail.python.org/mailman/listinfo/python-list
And when you do ask you
Eric V. Smith added the comment:
That's the correct behavior. The elements given by the start and end range are
replaced by what's on the right hand side of the assignment. They don't need to
be the same length.
>>> list_test=[0,1,2,3,4,5,6]
>>>
Change by Eric V. Smith :
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue43086>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric V. Smith added the comment:
I agree that we need a better pprint. I think it would be easier to create
something new rather than try and morph the existing pprint, but maybe I lack
enough imagination. I'd prefer to use functools.singledispatch instead of a
__pprint__ method, b
Eric V. Smith added the comment:
Adding an attribute on the __repr__ (and other methods?) signifying that they
were generated would let us distinguish them.
Say, checking getattr(__repr__, '__is_generated__', False), or similar.
--
Eric V. Smith added the comment:
I've been thinking about this some more, and I agree with Terry. Changing str()
seems dangerous, and __fspath__ wouldn't be backwardly compatible. If you want
the name, use .name. So I'm going to close this.
--
resolution: -&
Eric V. Smith added the comment:
I'm going to close this. The short circuit evaluation of and/or expressions is
already documented, and this behavior follows directly from that.
--
resolution: -> not a bug
stage: -> resolved
status: ope
Eric V. Smith added the comment:
I think this is pretty clearly the intended semantics. In your first example,
what do you propose "print(x)" would produce? Consider:
if False and (x:=input()) != '':
pass
else:
print(x)
We cannot change the semantics to now call inpu
Eric V. Smith added the comment:
Thanks, Mark. I'll just close it now. I've made a reminder about the PEP, but
not sure when/if I'll get to it.
--
resolution: -> rejected
stage: -> resolved
status: open -> closed
__
Eric V. Smith added the comment:
I agree with Serhiy: changing TemporaryDirectory.__str__() definitely has
drawbacks.
I assume gitPython is using str() where they might want to use os.fspath().
Maybe tempfile.TemporaryDirectory (and similar) could then support __fspath__.
--
nosy
Change by Eric V. Smith :
--
resolution: -> wont fix
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue41459>
___
___
Eric V. Smith added the comment:
Good point on surveying other languages for a PEP. You're further along in your
thinking than I am!
--
___
Python tracker
<https://bugs.python.org/is
Eric V. Smith added the comment:
I don't think it really matters what other languages do. We're not designing
this from scratch. We need to reflect that state we're in, which is many, many
lines of working code using 'j'. I see the two options as: support 'i
Eric V. Smith added the comment:
As I said in msg385648, I don't think it's feasible.
Maybe I'll write a PEP just to get it rejected so we can point to it when this
discussion comes up, which it does a few times a year.
--
___
Eric V. Smith added the comment:
Even if we wanted to switch to "i" we'd have to continue to also support "j":
there's a ton of existing code that uses it. Since "j" is used by some fields
(including my own) for the imaginary part of complex numbers,
Eric V. Smith added the comment:
+1 also. I agree with Raymond it should be optional.
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue42
Eric V. Smith added the comment:
See also https://github.com/python/mypy/issues/640 "Support type(None) as a
type", which was closed with "I don't think anyone cares". Jukka's comment was
"Or maybe we should update PEP 484 to not suggest that type(None) i
Eric V. Smith added the comment:
Notice that this isn't just for __init__ or return types, it happens with any
annotations (here, with 3.8):
>>> def g(i: None): pass
...
>>> g.__annotations__
{'i': None}
>>> get_type_hints(g)
{'i':
Eric V. Smith added the comment:
I don't think zero padding makes sense. For example:
>>> td = datetime.timedelta(hours=100)
>>> str(td)
'4 days, 4:00:00'
I think '4 days, 04:00:00' would not be very user friendly.
In any event, backward compat
Eric V. Smith added the comment:
Oops, my message collided with rhettinger.
--
nosy: +rhettinger
___
Python tracker
<https://bugs.python.org/issue42788>
___
___
Eric V. Smith added the comment:
Regular division (/) yields a float, so 1 / 1 is 1.0.
https://docs.python.org/3/reference/expressions.html#binary-arithmetic-operations
says that for floor division, the arguments are first converted to a common
type, which here would be float.
So, your
Eric V. Smith added the comment:
'abcddd'.find('a', start=0) would appear to be allowed from the help text, but
it isn't legal. This is because .find() does not allow keyword arguments.
It looks like find could be documented as
find(self, sub, start=None, end=None
Change by Eric V. Smith :
--
nosy: +eric.smith
___
Python tracker
<https://bugs.python.org/issue42765>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric V. Smith added the comment:
The ipaddress documentation references
https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml,
which says that 192.0.0.0/29 is reserved and not globally reachable. I think
in that sense, it's a private ad
Eric V. Smith added the comment:
This appears to not be a bug with Python, so I'm going to close this. If you're
having additional build problems, I suggest you ask for help on the python-list
mailing list, or maybe on Stack Overflow.
--
resolution: -> not a bug
stage:
Eric V. Smith added the comment:
I don't think there's any chance we'd add "in" as an alias for
"is_relative_to()", so I'm going to close this.
If you disagree, you could try and get support on python-ideas, and then we can
re-open this.
Thanks!
-
Change by Eric V. Smith :
--
versions: -Python 3.9
___
Python tracker
<https://bugs.python.org/issue42758>
___
___
Python-bugs-list mailing list
Unsubscribe:
Eric V. Smith added the comment:
Can you describe what this would do? How is it different from
path.is_relative_to(other_path)?
>>> import pathlib
>>> pathlib.Path('/home/Torxed/machine.qcow2').is_relative_to(pathlib.Path('/home/Torxed'
Change by Eric V. Smith :
--
components: +Build -Installation
___
Python tracker
<https://bugs.python.org/issue42753>
___
___
Python-bugs-list mailing list
Unsub
Eric V. Smith added the comment:
Do you have a C compiler installed? It's mentioned here
https://devguide.python.org/setup/#unixhttps://devguide.python.org/setup/#unix
I found a number of guides for building Python on Chromebooks via searching. I
don't have any experience, so I
Change by Eric V. Smith :
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue42724>
___
___
Eric V. Smith added the comment:
I'm just warning you that I probably won't accept it. I haven't heard of any
demand for this feature.
You might want to bring it up on python-ideas if you want to generate support
for the proposal.
--
___
Eric V. Smith added the comment:
I don't think this belongs in dataclasses itself, at least not until it's been
vetted widely. You might want to put it on PyPI first as a standalone project.
--
___
Python tracker
<https://bu
Eric V. Smith added the comment:
Something like that. You'd have to write some tests and try it out.
--
___
Python tracker
<https://bugs.python.org/is
601 - 700 of 2699 matches
Mail list logo