On Sun, May 14, 2017 at 1:28 PM, Steven D’Aprano
wrote:
- contact Tim Mitchell and see if his offer of contributing the code
> still stands;
>
FWIW, this is a Python implementation of a single-dispatch decorator for
methods that I wrote from looking at the stdlib, and that I have used
successfull
On 2017-05-14 00:34, Chris Angelico wrote:
On Sun, May 14, 2017 at 2:53 PM, Brendan Barnwell wrote:
Attributes aren't just for passing things to other methods. They're
for storing state. In your proposed system, how would an object mutate one
of its own attributes? It looks like "x"
Thanks Steven. I think you've just concisely summarized the info in this
section of the devguide:
https://docs.python.org/devguide/stdlibchanges.html
On Sun, May 14, 2017 at 10:28 AM, Steven D'Aprano
wrote:
> On Sun, May 14, 2017 at 05:10:53PM +, Bar Harel wrote:
> > As I said, sorry for tha
On Sun, May 14, 2017 at 05:10:53PM +, Bar Harel wrote:
> As I said, sorry for that.
>
> It's just that I'm not entirely sure there's anything to implement here.
> The implementation already exists. If it doesn't suffice I will help as
> much as I can to make sure it works :-)
I think you've s
On Sun, May 14, 2017 at 04:37:32PM +, Bar Harel wrote:
> I guess so.
>
> Sorry for that.
> To be honest I'm not entirely sure of the entire procedure and if small
> things need a PEP or not. I actually received the tip to bump from
> core-mentorship, so now I'm rather confused.
If you are ref
As I said, sorry for that.
It's just that I'm not entirely sure there's anything to implement here.
The implementation already exists. If it doesn't suffice I will help as
much as I can to make sure it works :-)
On Sun, May 14, 2017, 7:49 PM Guido van Rossum wrote:
> Maybe ask core membership
Maybe ask core membership if they meant you to literally just post just the
word "bump" to the list (my guess is not). Also the last time I see that
you received any advice was a long time ago and regarding to a different
issue. For this idea there's no issue and no patch (and core devs aren't
requ
On Sun, May 14, 2017 at 12:35 AM, Simon Ramstedt
wrote:
> What do you think are the odds of something like this actually making it
> into the Python and if greater than 0 in which timeframe?
>
If you're asking for language or stdlib support or an official endorsement,
the odds are exactly zero.
I guess so.
Sorry for that.
To be honest I'm not entirely sure of the entire procedure and if small
things need a PEP or not. I actually received the tip to bump from
core-mentorship, so now I'm rather confused.
Anyway, shall I add it to the bug tracker as an enhancement?
On Sun, May 14, 2017, 7
PS: I didn't see a message from Lisa on the mailing list -- maybe she
replied to you only?
On Sun, May 14, 2017 at 9:25 AM, Guido van Rossum wrote:
> How exactly do you think the process of adopting something into the stdlib
> works? Just posting "bump" messages to the mailing list doesn't reall
How exactly do you think the process of adopting something into the stdlib
works? Just posting "bump" messages to the mailing list doesn't really
help, it just sounds rude.If you need help understanding how to add/improve
a stdlib module, please ask a specific about that topic.
On Sun, May 14, 201
On Sun, May 14, 2017 at 9:14 PM, Steven D'Aprano wrote:
>> There are a couple of
>> solutions to that, though. The easiest to implement would be to change the
>> first line to `self = subclass(ParentClass())` where the subclass function
>> looks at the next item in the call stack (i.e. `MyClass`)
On Sun, May 14, 2017 at 01:33:32PM +0200, Antoine Rozo wrote:
> Also, how do you handle special methods for operators, such as __add__?
Oh, that's a good point! I forgot about that.
For implementation-dependent reasons, you couldn't use this proposed new
syntax for dunder methods:
def MyClass()
On Sun, May 14, 2017 at 07:35:38AM +, Simon Ramstedt wrote:
> Leaving the possible replacement for classes aside, do you have an opinion
> specifically about the following?
>
> def obj.my_function(a, b):
>...
>
> as syntactic sugar for
>
> def my_function(a, b):
> ...
>
> obj.my_func
Also, how do you handle special methods for operators, such as __add__?
2017-05-14 13:18 GMT+02:00 Steven D'Aprano :
> On Sun, May 14, 2017 at 11:12:21AM +0400, Abdur-Rahmaan Janhangeer wrote:
> > Whatever you all propose,
> >
> > coming from a java and c++ background, OOP in python is quite cumb
On Sun, May 14, 2017 at 11:12:21AM +0400, Abdur-Rahmaan Janhangeer wrote:
> Whatever you all propose,
>
> coming from a java and c++ background, OOP in python is quite cumbersome.
In what way it is cumbersome?
> if you tell that i am not a python guy, then consider that current oop
> style does
Some further thoughts...
On Sun, May 14, 2017 at 04:07:44AM +, Simon Ramstedt wrote:
> *proposed*:
>
> def MyClass(x):
> self = ParentClass()
> def my_method(y):
> z = x + y
> return z
> self.my_method = my_method # that's cumbersome (see comments belo
On Sunday, May 14, 2017 at 3:05:46 AM UTC-4, Steven D'Aprano wrote:
>
> On Sun, May 14, 2017 at 04:07:44AM +, Simon Ramstedt wrote:
> > Hi, do you have an opinion on the following?
>
> Hi, and welcome, and of course we have an opinion! This is Python-Ideas,
> we're very opinionated :-)
>
How do you call methods from superclass, like super in classic style ?
2017-05-14 9:45 GMT+02:00 Stephan Houben :
> FWIW, Javascript itself is moving away from this syntax in favour of a
> more Python-like syntax based on the 'class' keyword. This was introduced
> in EcmaScript 2015.
>
> Stephan
FWIW, Javascript itself is moving away from this syntax in favour of a more
Python-like syntax based on the 'class' keyword. This was introduced in
EcmaScript 2015.
Stephan
Op 14 mei 2017 09:35 schreef "Simon Ramstedt" :
> Hi, thanks a lot for your feedback!
>
> On Sun, May 14, 2017, 00:54 Brend
Bump
On Wed, Jan 4, 2017, 8:01 PM Lisa Roach wrote:
> +1 to this as well, I think this would be really useful in the stdlib.
>
> On Mon, Dec 26, 2016 at 5:40 AM, Bar Harel wrote:
>
>> Any updates with a singledispatch for methods?
>>
>> On Tue, Sep 20, 2016, 5:49 PM Bar Harel wrote:
>>
>>> At
Hi, thanks a lot for your feedback!
On Sun, May 14, 2017, 00:54 Brendan Barnwell wrote:
> On 2017-05-13 21:07, Simon Ramstedt wrote:
> > Hi, do you have an opinion on the following?
>
> My general opinion is that imitating JavaScript is almost always a
> bad
> idea. :-)
>
> > Wouldn't i
On Sun, May 14, 2017 at 2:53 PM, Brendan Barnwell wrote:
> Attributes aren't just for passing things to other methods. They're
> for storing state. In your proposed system, how would an object mutate one
> of its own attributes? It looks like "x" here is just stored in a function
> clos
Whatever you all propose,
coming from a java and c++ background, OOP in python is quite cumbersome.
if you tell that i am not a python guy, then consider that current oop
style does not reflect python's style of ease and simplicity
is __init__ really a good syntax choice?
Abdur-Rahmaan Janhange
On Sun, May 14, 2017 at 04:07:44AM +, Simon Ramstedt wrote:
> Hi, do you have an opinion on the following?
Hi, and welcome, and of course we have an opinion! This is Python-Ideas,
we're very opinionated :-)
> Wouldn't it be nice to define classes via a simple constructor function (as
> below
25 matches
Mail list logo