On Tue, Apr 13, 2021 at 1:29 PM Serhiy Storchaka
wrote:
> 12.04.21 21:49, Christopher Barker пише:
>
> If I have a time I finish my large patch for getting rid of __version__
> and other outdated variables. It was approved previously
> (
>
So I think there are multiple behaviors that are being described here and I
think there is validity in being able to potentially patch/modify
definitions when absolutely necessary, but I wonder if there's room here
for something in-between (also, I find the 'import export' or 'export
import'
> As another data point, flit *requires* that the package has a
> __version__ attribute.
flit no longer requires packages support `__version__` when using PEP 621
metadata
___
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an
12.04.21 21:49, Christopher Barker пише:
> Over the years, I've seen __version__ used very broadly but not *quite*
> in all packages. I've always known it was a convention, not a
> requirement. But it turns out it's not even a "official" convention.
If I have a time I finish my large patch for
On Tue, 2021-04-13 at 17:00 +0200, Hans Ginzel wrote:
> Are there any reasons not to make scalar types iterable returning the
> value ones?
> Should each function check if it has got one value or a list/tuple
> before iteration over the argument?
> What is wrong on scalars for iteration, please?
>
On Tue, 13 Apr 2021 at 18:14, Christopher Barker wrote:
>
> I agree here -- I think what needs to be official is what is In an installed
> package/distribution -- not how it gets there. But I do think the standard
> approach should be easy to do, even without special tools.
That's already
Whenever you extend the definition of an operation (`__iter__` in this case) to
more existing objects, you lose a little bit of the ability to catch errors
early. Consider the function:
def traverse(something):
for x in something:
# do stuff
...
If you
Thanks Paul,
> Having a __version__ attribute is fairly common these days, but
> definitely not universal even now. So the PEP still has a place, IMO.
>
Indeed -- I really think it needs to be finalized one way or another.
> But a lot has changed in the last 13 years. Python packaging is
On Mon, Apr 12, 2021 at 12:29 PM Thomas Grainger wrote:
> I prefer to use importlib.metadata.version("dist-name")
>
For my part, I don't like that approach -- I really believe in KISS. That
requires a pile of infrastructure to be in place -- compared to a simple
attribute in a package. It just
Are there any reasons not to make scalar types iterable returning the value
ones?
Should each function check if it has got one value or a list/tuple before
iteration over the argument?
What is wrong on scalars for iteration, please?
There is even legal to iterate over an empty set – an empty
10 matches
Mail list logo