What does Google think about Python ?!?

Earlier today I had the opportunity to speak with someone from Google who shared these thoughts with me in regard to Python…

  • Python tuple objects are immutable.
    • Tuple objects lack the methods that allow elements of a tuple to be modified however… tuple objects can be recast into lists, list objects are not so immutable, after the change has been made the lists can be recast as tuples, as follows:
      • x = (1,2) # x is a tuple
      • try:
      •     x[0] = 11 # this throws an error
      • exception:
      •     print ‘Error Will Robinson…’
      • x = list(x) # now x is a list
      • x[0] = 11 # this will not throw an error
      • x = tuple(x) # x is now a tuple once again
    • Obviously the guy from Google who thinks he knows Python failed to understand this one simple thing about tuple objects – “tuples were made to be cast as lists”.
      • Python tuple objects are as immutable as your typical window pane is not breakable… so long as you “think” your typical window pane cannot be broken and nobody ever picks-up a rock you are right… however… rocks were made to be thrown by people who have hands.
      • The fact is… there are no objects in Python that are truly immutable however tuple objects lack the methods that allow tuple members to be changed unless one recasts a tuple as a list and then back again after one makes the desired changes.
    • Additionally, one could create a tuple subclass that allows tuple members to be modified.
  • When a global variable is assigned a tuple it is not possible to make any changes to that global variable.
    • This is just False !!!
      • There is NOTHING special about variables that hold onto tuple object instances.
    • It is possible to make Constants using Python however this does not come with Python’s Standard Library.
      • Tuples are NOT Constants !!!
        • Variables that hold onto tuple pointers are NOT Constants !!!
      • Not even a Python Constant will be truly immutable even when a Global Variable is used to point to the Instance of a Python Constant.
        • The only way to make a Global or Static Variable in Python capable of being truly immutable is to place that Constant into a Module that lacks the ability to allow the Constant to be changed at runtime.
        • Your typical Python Global Variable can be changed, which is to say your typical Global Variable is Read-Write and can be assigned to a different value that can be a different Instance of a Python object.
  • The special thing about inheritance is multiple inheritance.
    • One man’s special is another man’s who-cares ?!?
    • Apparently even Google’s Search Engine does not even know “what is special about python inheritance“… LOL
      • You might think something “special” about Python might be clearly special to everybody however this is just NOTthe case in this instance…
        • Is it any wonder I might not know this specific aspect when, it seems, not enough other people do know about it to make it to the first page of a Google search… ROFL
          • On the other hand, not even this Google guy was aware of how special this aspect of Python was to himself but then we can all hold things close to our own hearts without getting approval from the rest of the world…

I was disappointed in how little this one guy from Google seems to know about Python OR maybe I just dug deeper into Python than Google has…


Maybe this Google guy think only hackers play-around with Python to the point of knowing the language inside and out and maybe this Google guy is only able to use Python in the most superficial way possible. ?!?

The great thing about computers is Computer Science… we can all test our assumptions to see whether or not our assumptions are correct or as-correct as we with them to be.

Also it’s refreshing to me to realize how human this one Google Guy is because he is not immune from wishful thinking where Python is concerned.  He “wishes” Python was a much better language than it is.  He “wishes” tuples are actually as immutable as he “wishes” them to be even though the language does not support his wishes, he continues to harbor his fanciful wishes.  This speaks well of his inner-child…

I like to stick with the Science… the way Python actually works… devoid of my own wishful thinking… Python tuples are no more immutable than my nose is unable to be cut off… I prefer to leave my nose intact just as one would have to prefer to leave a tuple instance unchanged but not because a tuple CANNOT be changed, just that one prefers a tuple to be immutable.

Try it for yourself and you be the judge !!!

%d bloggers like this: