On 2017-12-01 22:46, Steven D'Aprano wrote:
On Fri, Dec 01, 2017 at 10:23:37AM -0500, brent bejot wrote:
I have found myself implementing something like this before. I was working
on a command-line tool with nested sub-commands. Each sub-command would
import a script and execute something
On Fri, Dec 01, 2017 at 10:23:37AM -0500, brent bejot wrote:
> I have found myself implementing something like this before. I was working
> on a command-line tool with nested sub-commands. Each sub-command would
> import a script and execute something out of it. I ended up moving the
>
On Fri, 1 Dec 2017 at 10:11 Neil Schemenauer wrote:
> On 2017-12-01, Chris Angelico wrote:
> > Can you elaborate on where this is useful, please?
>
> Introspection tools, for example, might want to look at the module
> without executing it. Also, it is a building block to make
On Nov 29, 2017 10:09 PM, "Steven D'Aprano" wrote:
> On Thu, Nov 30, 2017 at 11:21:48AM +1300, Greg Ewing wrote:
>
> > It seems that many people think about unpacking rather
> > differently from the way I do. I think the difference
> > is procedural vs. declarative.
> >
> >
On 2017-12-01, Chris Angelico wrote:
> Can you elaborate on where this is useful, please?
Introspection tools, for example, might want to look at the module
without executing it. Also, it is a building block to make lazy loading
of modules work. As Nick points out, importlib can do this
On Fri, Dec 1, 2017 at 6:16 AM, Paul Moore wrote:
> > I genuinely don't think these kinds of operators are all that useful
> > outside the specific domain of working with semi-structured
> > hierarchical data stored in graph databases and document stores like
> > MongoDB,
> On 1 Dec 2017, at 12:29, Nick Coghlan wrote:
>
> On 1 December 2017 at 21:04, Ronald Oussoren wrote:
>> The second question is more a design question: what’s the better design,
>> having __getdescriptor__ as a class method on classes or as method
I have found myself implementing something like this before. I was working
on a command-line tool with nested sub-commands. Each sub-command would
import a script and execute something out of it. I ended up moving the
importing of those little scripts into the functions that called them
because
On 01.12.2017 1:19, Greg Ewing wrote:
Ivan Pozdeev via Python-ideas wrote:
I needed to hold an external function reference in an object instance
(if I assigned it to an attribute, it was converted into an instance
method).
No, that only happens to functions stored in *class* attributes,
On 1 December 2017 at 13:40, Nick Coghlan wrote:
> I genuinely don't think these kinds of operators are all that useful
> outside the specific domain of working with semi-structured
> hierarchical data stored in graph databases and document stores like
> MongoDB,
On 1 December 2017 at 04:49, Antoine Pitrou wrote:
> On Wed, 29 Nov 2017 18:14:36 +1000
> Nick Coghlan wrote:
>>
>> As far as utility goes, I put it in a similar category to matrix
>> multiplication: if you don't need it, you don't need it, but when you
On 1 December 2017 at 21:04, Ronald Oussoren wrote:
> The second question is more a design question: what’s the better design,
> having __getdescriptor__ as a class method on classes or as method on
> metaclasses? Either one would work, but a class method appears to be
> On 1 Dec 2017, at 11:32, Nick Coghlan wrote:
>
> On 1 December 2017 at 19:15, Ronald Oussoren wrote:
>
>> Maybe, but how would this work with super()? Super walks the MRO of type of
>> the instance, but skips the class on the MRO. This is not
On Thu, Nov 30, 2017 at 08:02:08PM +0300, Ivan Pozdeev via Python-ideas wrote:
> My experience with these operators in C# says:
> * They do save "more than a few keystrokes". Even more importantly, they
> allow to avoid double evaluation or the need for a temporary variable
> workaround that
On 1 December 2017 at 20:17, Steven D'Aprano wrote:
> If that's what you mean, then no, I haven't wished for that. Unless I'm
> missing something, it seems pointless. When, and why, would I want to
> import an empty module?
Having access to something along these lines is the
On 1 December 2017 at 19:15, Ronald Oussoren wrote:
> Maybe, but how would this work with super()? Super walks the MRO of type of
> the instance, but skips the class on the MRO. This is not equivalent to
> walking the MRO of the second class on the MRO when you use
On 1 December 2017 at 00:34, Ilya Kulakov wrote:
> Anyway, my expectation is that going along this way (i.e. removing all
> runtime API apart from a necessary minimum)
> will give a minor speed-up as compared to PEP 560 at the cost of a
> breaking change (even for small
On Fri, Dec 01, 2017 at 02:13:37AM -0600, Neil Schemenauer wrote:
> I have been working on reducing Python statup time. It would be
> nice if there was some way to load a module into memory without exec
> of its body code. I'm sure other people have wished for this.
I don't understand why you
On 1 December 2017 at 09:48, Kirill Balunov wrote:
> Probably, some time ago it was necessary to split this thread into two
> questions:
> 1. Philosophical question regarding sequences and iterators. In particular,
> should they behave differently depending on the
2017-11-29 22:33 GMT+03:00 Steve Barnes :
>
> Just a thought but what about a syntax something along the lines of:
>
> a, b, *remainder = iterable
>
> Where remainder becomes the iterable with the first two values consumed
> by assigning to a & b. If the iterator has less
> On 1 Dec 2017, at 07:01, Nick Coghlan wrote:
>
> On 1 December 2017 at 01:23, Ronald Oussoren wrote:
>> 1) Last time around Mark Shannon worried that this introduces infinite
>> recursion in the language itself (in my crummy summary, please read
On 1 December 2017 at 18:37, Nick Coghlan wrote:
> On 1 December 2017 at 18:13, Neil Schemenauer
> wrote:
>> I have been working on reducing Python statup time. It would be
>> nice if there was some way to load a module into memory without exec
On 1 December 2017 at 18:13, Neil Schemenauer
wrote:
> I have been working on reducing Python statup time. It would be
> nice if there was some way to load a module into memory without exec
> of its body code. I'm sure other people have wished for this.
>
> Perhaps
On Fri, Dec 1, 2017 at 7:13 PM, Neil Schemenauer
wrote:
> I have been working on reducing Python statup time. It would be
> nice if there was some way to load a module into memory without exec
> of its body code. I'm sure other people have wished for this.
I
I have been working on reducing Python statup time. It would be
nice if there was some way to load a module into memory without exec
of its body code. I'm sure other people have wished for this.
Perhaps there could be a new special function, similar to __import__
for this purpose. E.g.
25 matches
Mail list logo