Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 ALL


  Mutli-inheritance bug between python 2.7 and 3.7

When we have run a py3.7 code under py2.x or a py2.x code under 3.x ,if a class do mutli-inheritance from 2 parent and the 2 parents also got inheritance from same parent, the different way to handle inheritance chain between python 2 and 3 will cause some running time bug:Assume we got this sample program inheritTest.py :# Purpose: Test mutli-inheritance different between python2 and 3# Author: Yuancheng Liu# Created: 2019/05/16class A: def getVal(self): print("call A's getVal()") def setVal(self): print("call A's setVal()")class B(A): def getVal(self): ...

2,602 1       INHERITANCE PYTHON 3 PYTHON


  Thoughts on Python 3

I spent the last couple of days thinking about Python 3's current state alot. While it might not appear to be the case, I do love Python as alanguage and especially the direction it's heading in. Python has been notonly part of my life for the last couple of five years, it has been thelargest part by far.Let there be a warning upfront: this is a very personal post. I counted ahundred instances of a certain capital letter in this text.That's because I am very grateful for all the opportunities I got over thelast few years to travel the world, to talk to people and to share thespirit that an ...

1,919 0       PYTHON FEATURE DRAWBACK PYTHON 3 EMBRACE