19.07.17 01:33, Greg Ewing пише:
Jim J. Jewett wrote:
is there any reason not to simply define it as a view on a dict, or at
least as a limited proxy to one?
Some valuable characteristics of namedtuples as they are now:
* Instances are very lightweight
* Access by index is fast
* Can be used
Yeps,
> 'Event' is designed as a lowish-level primitive: the idea is that it
> purely provides the operation of "waiting for something", and then you
> can compose it with other data structures to build whatever
> higher-level semantics you need. From this point of view, it doesn't
> make much se
> On 19 Jul 2017, at 00:35, Jim J. Jewett wrote:
>
> Ronald Oussoren came up with a concrete use case for wanting the
> interpreter to consider something a string, even if it isn't
> implemented with the default datastructure.
>
> In https://mail.python.org/pipermail/python-ideas/2017-July/0464
On 19 July 2017 at 09:40, Victor Stinner wrote:
> Supporting a new kind of string storage would require a lot of efforts.
> There are a lot of C code specialized for each Unicode kind
If I understand the requested flag correctly, it would be to request
one of the following:
1. *Never* use any of
On Tue, Jul 18, 2017 at 09:13:11PM -0400, Jim J. Jewett wrote:
> There have been times when I wanted to group portions of a module,
> class, or function. Giving names to each of those groupings would be
> useful, and would be appropriate for python-level changes.
I don't know about grouping parts
On 19 July 2017 at 06:40, George Fischhof wrote:
> I think yes ;-)
> I would like to use (or I think it would be good to use) something like
> pathlib.Path(package_root)
> so I could use
>
> importlib.import_module(pathlib.Path(package_root) / plugins / plugin_name)
No, as that's fundamentally in
On Tue, Jul 18, 2017 at 06:16:26PM -0400, Jim J. Jewett wrote:
> Given that
>
> (1) dicts now always pay the price for ordering
> (2) namedtuple is being accelerated
>
> is there any reason not to simply define it as a view on a dict, or at
> least as a limited proxy to one?
Tuples are much more
There have been times when I wanted to group portions of a module,
class, or function. Giving names to each of those groupings would be
useful, and would be appropriate for python-level changes.
That said, it would probably need more proof in the wild first, so the
first step would be getting sup
Supporting a new kind of string storage would require a lot of efforts.
There are a lot of C code specialized for each Unicode kind
Victor
Le 19 juil. 2017 12:43 AM, "Jim J. Jewett" a écrit :
> Ronald Oussoren came up with a concrete use case for wanting the
> interpreter to consider something
On Tue, Jul 18, 2017 at 3:18 PM, Greg Ewing
wrote:
> Ethan Furman wrote:
>
>> I certainly don't expect the signature to change, but why is using a
>> metaclass out? The use (or not) of a metaclass /is/ an implementation
>> detail.
>>
>
> For me, the main benefit of using a metaclass would be tha
Ronald Oussoren came up with a concrete use case for wanting the
interpreter to consider something a string, even if it isn't
implemented with the default datastructure.
In https://mail.python.org/pipermail/python-ideas/2017-July/046407.html
he writes:
The reason I need to subclass str: in PyO
Jim J. Jewett wrote:
is there any reason not to simply define it as a view on a dict, or at
least as a limited proxy to one?
Some valuable characteristics of namedtuples as they are now:
* Instances are very lightweight
* Access by index is fast
* Can be used as a dict key
All of those would
On Tue, Jul 18, 2017 at 2:33 PM, Pau Freixes wrote:
> Morning guys,
(Not everyone here is a guy.)
> I came across with that idea trying to resolve a typical dogpile
> pattern [1], having many DNS calls to the same domain because of a
> miss in a DNS cache.
>
> The usage of the the set either to
Ethan Furman wrote:
I certainly don't expect the signature to change, but why is using a
metaclass out? The use (or not) of a metaclass /is/ an implementation
detail.
For me, the main benefit of using a metaclass would be that
it enables using normal class declaration syntax to define a
named
Given that
(1) dicts now always pay the price for ordering
(2) namedtuple is being accelerated
is there any reason not to simply define it as a view on a dict, or at
least as a limited proxy to one?
Then constructing a specific instance from the arguments used to
create it could be as simple as
On 07/18/2017 09:09 AM, Guido van Rossum wrote:
On Tue, Jul 18, 2017 at 8:56 AM, Ethan Furman wrote:
I certainly don't expect the signature to change, but why is using a metaclass
out? The use (or not) of a metaclass
/is/ an implementation detail.
It is until you try to subclass with anoth
Morning guys,
I came across with that idea trying to resolve a typical dogpile
pattern [1], having many DNS calls to the same domain because of a
miss in a DNS cache.
The usage of the the set either to notify that the waiters could be
awake and get the result from the cache or use it to notify th
In the other thread, I had mentioned my "extradict" implementation - it
does have quite a few differences as it did not try to match namedtuple
API, but it works nicely for all common use cases - these are the timeit
timings:
(env) [gwidion@caylus ]$ python3 -m timeit --setup "from collections imp
2017-07-18 15:56 GMT+02:00 Nick Coghlan :
> On 18 July 2017 at 22:08, George Fischhof wrote:
> > Hi there,
> >
> > I created a program which uses plugins (import them). I started to test
> it,
> > and found that I need two types of paths: one for file system and another
> > one which is package r
On 07/17/2017 09:06 PM, David Mertz wrote:
On Jul 17, 2017 7:56 PM, "Ethan Furman" mailto:et...@stoneleaf.us>> wrote:
On 07/17/2017 06:34 PM, Steven D'Aprano wrote:
On Mon, Jul 17, 2017 at 05:01:58PM -0700, Ethan Furman wrote:
Guido has decreed that namedtuple shall be
On Tue, Jul 18, 2017 at 8:56 AM, Ethan Furman wrote:
> I certainly don't expect the signature to change, but why is using a
> metaclass out? The use (or not) of a metaclass /is/ an implementation
> detail.
>
It is until you try to subclass with another metaclass -- then you have a
metaclass con
On 07/17/2017 06:25 PM, Eric Snow wrote:
On Mon, Jul 17, 2017 at 6:01 PM, Ethan Furman wrote:
Guido has decreed that namedtuple shall be reimplemented with speed in mind.
FWIW, I'm sure that any changes to namedtuple will be kept as minimal
as possible. Changes would be limited to the under
On 18 July 2017 at 22:08, George Fischhof wrote:
> Hi there,
>
> I created a program which uses plugins (import them). I started to test it,
> and found that I need two types of paths: one for file system and another
> one which is package relative.
>
> So I thing this is a good idea, to enhance p
On 18 July 2017 at 14:31, Guido van Rossum wrote:
> On Mon, Jul 17, 2017 at 6:25 PM, Eric Snow
> wrote:
>>
>> On Mon, Jul 17, 2017 at 6:01 PM, Ethan Furman wrote:
>> > Guido has decreed that namedtuple shall be reimplemented with speed in
>> > mind.
>>
>> FWIW, I'm sure that any changes to named
On Tue, Jul 18, 2017 at 01:55:15PM +0200, George Fischhof wrote:
> Hi there,
>
> I used tempfile.TemporaryDirectory(). On first usage it was good, but on
> second one there was a need to create tempopray directory and files in it a
> given place. (It needed for a test).
>
> And I found that Tempo
2017-07-18 14:06 GMT+02:00 Serhiy Storchaka :
> 18.07.17 14:55, George Fischhof пише:
>
>> I used tempfile.TemporaryDirectory(). On first usage it was good, but on
>> second one there was a need to create tempopray directory and files in it a
>> given place. (It needed for a test).
>>
>> And I fou
Hi there,
I created a program which uses plugins (import them). I started to test it,
and found that I need two types of paths: one for file system and another
one which is package relative.
So I thing this is a good idea, to enhance pathlib to handle package roots.
(I know about sys.path, envir
18.07.17 14:55, George Fischhof пише:
I used tempfile.TemporaryDirectory(). On first usage it was good, but on
second one there was a need to create tempopray directory and files in
it a given place. (It needed for a test).
And I found that TemporaryDirectory() is not able to do this. So my id
Hi there,
I used tempfile.TemporaryDirectory(). On first usage it was good, but on
second one there was a need to create tempopray directory and files in it a
given place. (It needed for a test).
And I found that TemporaryDirectory() is not able to do this. So my idea is
to implement this behavio
29 matches
Mail list logo