clear_dir() is unambiguous.
Cheers,
Nick.
--
Nick Coghlan | [email protected] | Brisbane, Australia
_______
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/
, ask
what you can do for our language.
Mark Lawrence
___
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/
ly popular, then it would make a stronger
case for incorporation in the core.
Stephan
Op 29 aug. 2016 2:12 p.m. schreef "Mark Lawrence via Python-ideas"
mailto:[email protected]>>:
On 29/08/2016 02:44, Ken Kundert wrote:
Changing Python so that it understand
CamelCase
used in ‘DictReader’. But maybe that’s just an attempt at foolish consistency
:).
best,
—titus
___
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3
oking for read or
readline instead? Codifying that in some standard way could be nice.
best,
—titus
> On Sep 5, 2021, at 5:30 PM, Oscar Benjamin wrote:
>
> On Mon, 6 Sept 2021 at 01:13, Greg Ewing wrote:
>>
>> On 6/09/21 3:07 am, C. Titus Brown via Python-ideas wrote:
>>
)
___
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org/archives/list/[email protected]/message
Hi all,
python-ideas moderator here. It’d be great if y’all could take a few days to
cool off the frozen set discussion, which is veering off the rails a little bit
into emotional language.
I’ll keep an eye on it and put emergency moderation into effect if I must, but
it’d be nicer if I
gt;> B), then you can say C > A and C > B, but then you can't say A > B or A < B
>>> which breaks sorting.
>>>
>>> If you want to know if a B inherits from Base, then I think `Base in
>>> B.mro()` will cover that just as succinctly. And if you need
hat would be a lovely addition.
_______
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org/archives/list/p
On Thu, Mar 12, 2020 at 2:32 PM Marco Sulla via Python-ideas
wrote:
>
> On Thu, 12 Mar 2020 at 21:22, Chris Angelico wrote:
> > They actually ARE already discarded
>
> 0O
> You're right. So *how* can juliantaylor said he measured a speedup of
> 2x for large ndar
ng it. Good catch from the end. I found another similar at
> https://gstindianews.info. But you get the idea - a simple wrapper around
> a list is going to be way better than a wrapper around StringIO. i
>
> jayesh
> _______
> Python
:
The code of conduct that governs this list (and all Python spaces) is here,
https://www.python.org/psf/conduct/.
If you want to discuss the python code of conduct and its applicability to this
thread (or anything else), python-ideas is not the place to do so. You may do
so privately with the
Hi all,
as a moderator of python-ideas, I’ve asked postmaster to place python-ideas
into emergency moderation. (I do not have the tools to do so myself.) I’m
willing to review messages individually as needed.
best,
—titus
> On Jun 29, 2020, at 9:24 AM, Abdur-Rahmaan Janhangeer
>
simply take the
remainder when the index is divided by n as the index.
Because of the close relationship between finite length sequences and periodic
sequences this feature might simplify scientific computing(circular convolution
etc).
_______
Python-ideas m
loops when iterating over nD arrays in
NumPy.
_______
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived
on for cylindrical indexing of 2D and in general nD
arrays is offered by the fact that n-dimensional DFT reduces n-dimensional
circular convolution to element-wise multiplication.
_______
Python-ideas mailing list -- [email protected]
To unsubscribe send
: [email protected]; [email protected]
Subject: Re: [Python-ideas] Getting rid of FOR loops and simplifying cicular
conviolutions with Circular Indexing
days_of_the_week[14 % 7]
There ya go!
On Wed, Nov 25, 2020 at 12:51 PM Mathew M. Noel via Python-ideas
mailto:[email protected]
: Mathew M. Noel
Cc: python-ideas; [email protected]
Subject: Re: [Python-ideas] Getting rid of FOR loops and simplifying cicular
conviolutions with Circular Indexing
You've started three separate threads to propose something that has exactly
zero chance of happening, and would be of
getattr__``
> is called only for missing attributes.
>
>
> References
> ==
>
> .. [1] PEP 484 section about ``__getattr__`` in stub files
>(https://www.python.org/dev/peps/pep-0484/#stub-files)
>
> .. [2] The reference imp
s ain't a
walk in a park, and there's the boilerplate and the crazy issues with
interpreter shutdown.
--
Thanks,
-- Ionel Cristian Mărieș, http://blog.ionelmc.ro
___________
Python-ideas mailing list
[email protected]
https://mail.python.org/mai
PositiveInteger(metaclass=MyMeta):
@classmethod
def __instancehook__(cls, instance):
return isinstance(instance, int) and instance > 0
Of course, the real implemention is more detailed...
What do you think about that ?___
Python-id
y. Maybe I can make this compatible with it anyway._______
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/
ct, when MappingView inherit
from Collection, dict_values is considered as a subclass of Collection since
it's in the register of ValuesView, causing the above bug...
So, the test have to be changed, and dict_values must be placed in the samples
that pass the test, and not in the ones that fail it
;/usr/lib/python3.6/_collections_abc.py", line 764, in __iter__
yield self._mapping[key]
TypeError: list indices must be integers or slices, not str
It's because __init__ in MappingView treat the passed argument -- wich is
stored in self._mapping -- as the whole mapping, not jus
checked during the __subclasshook__ of this ABC to
know if a class is a virtual subclass of it or not (when pass as a second
argument of issubclass() for example).
I don't think it's an error in UML to re-display them since they are abstracts
(it would be if they were concretes beca
Mixin
Methods.
_______
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/
c.png]___
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/
etty weird to me that registry is empty... All the iterators in
the cache should've been in the registry instead, should'nt they?
_______
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/
In the table of the documentation page, the abstract methods are listed fisrt.
In the source code, the abstract methods are implemented fisrt.
In UML, the convention is to place the abstract methods first.
___________
Python-ideas mailing list
Python-ideas@python.
ll!
_______
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/
's empty:
every iterator passed to Iterator.register() defines __iter__ and __next__, so
they satisfy Iterator.__subclasshook__ and are added to the cache beforehand.
___
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/
ragmatic Programmer,
Andrew Hunt & David Thomas.
Here are the files! I used plantuml.
base.puml
Description: Binary data
full.puml
Description: Binary data
other_collections.puml
Description: Binary data
___
Python-ideas mailing list
Python-ideas
also interesting by the way...___
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/
nsome going forward or we will simply have to
>> drop the image at the first instance of needing to update it because no one
>> can or be willing to put in the effort (and I'm thinking in 5 years, not
>> soon while we can count on you to help).
>>
>> On Sat, Dec
ections-abc-uml/blob/master/plantuml/other_collections.svg
https://gitlab.com/yahya-abou-imran/collections-abc-uml/blob/master/plantuml/full.svg_______
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
hat
it's a lot more work (and pain) than a plain text file.
___________
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/
rite to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
USA.
.
The full text of the GPL is distributed in
/usr/share/common-licenses/GPL-3 on Debian systems.
_______
Python-ideas mailing list
Python-ideas@py
And on the sourceforge page:
https://sourceforge.net/projects/plantuml/
License
GNU General Public License version 2.0 (GPLv2)
___
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct
don't manage to all agree with each other, I will just let the issue open
until somebody comes with an undisputed solution._______
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of Condu
attr, value in self.__dict__.items()
if not attr.startswith('_')}
___________
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/
amespace you want to expose to your clients without compromosing the real one.
Of course, the real one could always be accessible via __dict__ (if present).
_______
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/
apply of course._______
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/
gt;> s = set([10, 20, 1])
>>> s
{1, 10, 20}
You're seeing an accidental byproduct of the implementation.
Eric
_______
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
ht
a performance issue with keyword arguments vs.
positional. People are touchy when it comes to dicts!
Eric
_______
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.
;yeah, we said dicts are ordered in 3.6 but
you shouldn't count on it, so we're going to make them unordered in
3.7". It would just never happen.
That all said, I'm still -1 on this PEP, for reasons I won't rehash.
Eric
_______
n't stop 2.9 through 2.11!
Eric
_______
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail
very least address in the PEP the fact
> that this would close the door on future explicit evaluation models?
Every time I’ve looked at this, I come back to: other than the clunky syntax,
how is explicit evaluation different from a zero-argument lambda?
Eric
___
ssible to copy a
> signature as is (with functools.wraps() and equivalents).
>
> ChrisA
> ___
> Python-ideas mailing list -- [email protected]
> To unsubscribe send an email to [email protected]
> https://mail.python.org
the
effort.
That would be the beauty of 638: if it's important to one piece of code,
it could be just enabled there. Of course the implementing macro would
need to be either part of your application or become a dependency.
But I'm under no delusions that this PEP will ever get accept
> On Dec 17, 2022, at 10:08 AM, [email protected] wrote:
>
> Bruce Leban wrote:
>>> Try googling "python-ideas string prefixes". Doing mimimal diligence is a
>>> reasonable expectation before writing up an idea.
>
> Thanks for the query "stri
next possible step
> for this feature.)
>
> *Backwards compatibility*
> This syntax currently raises a invalid syntax error. So introducing this
> shouldn't break existing programs. Python's currently supported string types
> are just single letter, so the suggestion i
-CHB
--
Christopher Barker, PhD (Chris)
Python Language Consulting
- Teaching
- Scientific Software Development
- Desktop GUI and Web Development
- wxPython, numpy, scipy, Cython
___
Python-ideas mailing list -- pyt
ke non-meaningful backslashes
> illegal in string literals' thread[3] could be revived as well, maybe
> even with "\f\v" deprecated, "\e" = "\33" introduced and such.
>
> Please let me know what you think, what else could break, and
ld attribute.
___
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at https://mail.python.org/archives/list/python-ideas@python
But without knowing the use case, it's hard to say.
Eric
_______
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
http
this in editor (see my later e-mails)2. The f-string functionality for it is already there:
f'{a=}'.rstrip(f'{a}')
# or a bit better
f'{a=}'.split('=')[0]
# = exactly what I am proposing (Except the unneeded evaluation part)
So if it is already ther
nt line.
Eric
_______
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org/archives/list/python-i
st is basically dead.
And when you do post over there, please provide an example. It's not
clear what would happen in the generated code if abstract=True.
Eric
_______
Python-ideas mailing list -- [email protected]
To unsubscribe send an emai
htening.
-CHB
_______
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/
other — what’s special about is
that it can’t be rebound.
-CHB
>
> --
> Rhodri James *-* Kynesim Ltd
_______
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/
206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
[email protected]
_______
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/
look at
traitsui for ideas.
http://docs.enthought.com/traitsui/
-CHB
___
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/
t. So there should be s way to customize user interaction.
Too bad all the cool kids are doing web dev these days — hard to get
help with a desktop GUI project :-(
> Pyjamas seems to be something like that:
>
> https://pypi.org/project/Pyjamas/
Or it was 6 years ago :-(
-CHB
_____
ood choice!
We’re have enough trouble with really slow adoption of the new ways of
doing packaging, not even providing the tools seems to really defeat the
purpose.
-CHB
___
Python-ideas mailing list
[email protected]
https://mail.python.org/mail
CHB
___
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/
t;
> from . import test_main
>
> to get the test/test_main module from the test/__init__ module.
>
> (Disclaimer: I have not actually run the above code to check that it
> works, beyond testing that its not a SyntaxError.)
>
> What *precisely* is the problem you are tryi
Chris Barker via Python-ideas
>> wrote:
>> [...]
>> I'm still confused -- what's so wrong with:
>>
>> list(map(func, some_iterable))
>>
>> if you need a sequence?
>
> You might need a sequence. Why do you think that has to be an *eager*
> seq
sure why one would do that, but it should be possible.
- CHB
_______
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/
> Alex Shafer via Python-ideas wrote:
>> 1) I'm in favor of adding a stringify method to all collections
>
> Are you volunteering to update all the collection
> classes in the world written in Python? :-)
To be fair, we could add an implementation to the sequence ABC, a
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/
, a method like future.set_result_threadsafe,
which would hide the details of the loop.call_soon/call_soon_threadsafe
_______
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.pyth
eptionMaker("BadStuffErrror", details, plus, more_details)
>
> Implementation of 'ExceptionMaker' left to readers. But it's possible
> to write once.
>
>
>
> ___
> Python-ideas mailing list -- [email protected]
> To
nslated and manually scanning/splitting on null characters, though
I'm sure there are better way to do this.
Thanks,
Brian Vanderburg II
_______
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to python-ideas-le..
s not None:
data["count"] = count
Could be written as
data = {
"count" = count is not None ?? count, # set the "count" key in the
dictionary conditionally, if count is not None, else don't set the key
at all
"other_param" = ... ?? ...,
...
}
oesn’t seem like a good idea to be handling months and
femptoseconds with the same “encoding”
-CHB
_______
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/
mber (and ascii) to represent the bytes, as it’s
more human readable and consistent with other python types.
> Maybe I'm completely misunderstanding your statement here.
Again, it doesn’t much matter, until you get to deciding how to
bitshift an entire bytes object.
-CHB
____
ood solution. I know I spent years thinking “there
should be an easy way to do this” before I found setdefault().
-CHB
>
> :-)
>
> [snip]
> _______
> Python-ideas mailing list
> [email protected]
> https://mail.python.org/mailman/list
need it so often.
>
> I think Path fits the bill for being a built-in, I feel it's used more
> often than any/all or zip, and maybe enumerate.
>
> Besides, it would help to make people use it, as I regularly meet dev
> that keep import os.path because of habits, tutorials, boo
s suggested in this thread) but that would
bring up the startup costs problem.
I wonder if a Path-lite with the core functionality, but less startup
cost, would be useful here?
-CHB
_______
Python-ideas mailing list
[email protected]
https://mail
y, as the runtime can
pass relevant information such as the variables name
This was just an idea I had that may have some use.
Thanks,
Brian Vanderburg II
signature.asc
Description: OpenPGP digital signature
___
Python-ideas mailing list
Pytho
egistry["method"]
@fn
def method(self):
pass
# print None
# print Y
Y = fn(12)
In this case it's not longer a decorator idea but more of an idea for a
called function to be able to retrieve certain meta information about
it's
edge cases.
So wrapping (or translating) an existing (well thought out) lib might
be an easier way to go.
-CHB
_______
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/
.
-CHB
___
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/
___
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/
sion that transforms the list first.
That would get the keys right. Though still not call append for you.
So maybe a solution is an accumulator special case of defaultdict — it
uses a list be default and appends by default.
Almost like counter...
-CHB
_______
Pyt
l is.
Which makes me think — a new classmethod on the builtin dict is a
pretty heavy lift compared to a new type of dict in the collections
module.
-CHB
_______
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-
ilt a
histogram for continuous data as well.
Though that might be a bit klunky.
But if someone thinks that’s a good idea, a PR for an example would be
accepted:
https://github.com/PythonCHB/grouper
-CHB
--
Steve
___
Python-ideas mailing list
Python-
__
> Python-ideas mailing list
> [email protected]
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
___________
Python-ideas mailing list
Python-ideas@pyth
de, and run a garbage collector once in a while
instead.
After all, cPython’s (mostly) deterministic garbage collection is not
guaranteed by the language standard.
-CHB
___________
Python-ideas mailing list
[email protected]
https://mail.python.org/mailma
in the end. Sure, type hints could be used as a bare trigger for certain
> optimistic optimisations, but then, it's cheap enough to always apply these
> optimisations regardless, via a C type check.
>
> Stefan
>
> __
t; something which could much more easily be done by adding an rreplace
> function - which is the real point of the comment.
> Paul
> _______
> Python-ideas mailing list
> [email protected]
> https://mail.python.org/mailman/listinfo/
lp the authors of suck a package(s),
but if the bulk of users didn’t need them, then no point in adding
them to the language.
-CHB
_______
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of
; ---
This is also a convention — and primarily applies to mutable defaults,
which you hardly ever want to assign directly.
So a good example of None being used as a sentinel, but nog really
anything special about None.
-CHB
> /
___
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/
1601 - 1693 of 1693 matches
Mail list logo