Re: [sage-devel] Python3 and super()

2017-11-17 Thread Eric Gourgoulhon
Thanks Jeroen for your answer. 
Accordingly, I am keeping the Python-2 way. 

Best regards,

Eric.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Python3 and super()

2017-11-16 Thread Jeroen Demeyer

On 2017-11-16 15:02, Eric Gourgoulhon wrote:

I understand that the Python2-syntax of super, i.e. super(class,
self), is still valid in Python3 [1] so this should not hamper the
transition to Python3, but in writing new code (as I am doing at the
moment) shouldn't we use the Python3 way, i.e. super() ?


I didn't know that from "builtins import super" could do that. 
Personally, I would rather just keep using the Python 2 explicit 
super(...). There is nothing wrong with that.



Btw such an import is not performed in the file
src/sage/structure/parent.pyx cited above, so I am wondering how the
super() in that file works...


That's a *Cython* file which supports super() out of the box.

--
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.