On Mon, Feb 13, 2017 at 5:48 PM, Steven D'Aprano
wrote:
> # the clean proposed way:
> def instance.method(self): # or MyClass.method
> ...
>
> But I don't think that we can reasonably argue that the suggested syntax
> isn't a clear, non-trivial win over the status quo, not unless we're
> als
On Fri, Feb 10, 2017 at 09:05:49PM -0500, Terry Reedy wrote:
> >def foo(self):
> >pass
> >Foo.foo = foo
> >
> >Becomes:
> >
> >def Foo.foo(self):
> >pass
>
> Saving about 10 keystrokes is close to trivial.
The same argument can be made for @decorator syntax.
And, if
On Sun, Feb 12, 2017 at 10:29:10PM +0100, Nick Coghlan wrote:
[...]
> Method injection is most attractive to me as a potential alternative
> to mixin classes that has fewer runtime side effects by moving more of
> the work to class definition time.
>
> More philosophically though, it offends my la
On Mon, Feb 13, 2017 at 11:50:09AM -0800, Matt Gilson wrote:
> For whatever weight my opinion holds, I'm +0 on this one. In my
> estimation, in an ideal world it seems like:
>
> class Foo(object):
> def bar(self):
> """Bar!"""
>
>
> # Identical to:
>
> class F
On Mon, Feb 13, 2017 at 02:32:33PM -0500, Joseph Hackman wrote:
> Generally speaking, I'm +1 on this idea, I think it would make code
> more readable, especially for tools like IDEs.
>
> I just wanted to ask: can someone point me to the reason Python
> doesn't support referencing a class inside
On 13.02.2017 20:32, Joseph Hackman wrote:
> I just wanted to ask: can someone point me to the reason Python doesn't
> support referencing a class inside it's own definition? It seems like that
> would solve some of the cases discussed here, and with Type hinting that
> seems like something that
For whatever weight my opinion holds, I'm +0 on this one. In my
estimation, in an ideal world it seems like:
class Foo(object):
def bar(self):
"""Bar!"""
# Identical to:
class Foo(object): pass
def Foo.bar(self):
"""Bar!"""
But I think that's goi
Generally speaking, I'm +1 on this idea, I think it would make code more
readable, especially for tools like IDEs.
I just wanted to ask: can someone point me to the reason Python doesn't support
referencing a class inside it's own definition? It seems like that would solve
some of the cases di
On 2017-02-12 14:01, Joao S. O. Bueno wrote:
> On 12 February 2017 at 14:51, Markus Meskanen
> wrote:
>> 1. Allowing the class to be used in the method's header, f.e. for typing and
>> decorators:
>>
>> @decorate(MyClass)
>> def MyClass.method(self, other: MyClass) -> List[MyClass]:
>>
Hi There,
I several times found that it is quite difficult to find an appropriate
library in package index.
I have two ides to improve the package index:
1.)
Query like in a webshop: checkboxes should use to select from attributes.
(topic, environment, category etc) It would br good to put a "do
10 matches
Mail list logo