Software Object Constructor

From GM-RKB
Jump to navigation Jump to search

A Software Object Constructor is a software subroutine that creates software objects.



References

2016

2015

2015

  • https://stackoverflow.com/a/8212438
    • QUOTE: In essence, it's impossible both because python does not use constructors the way you may think it does if you come from other OOP languages and because python does not enforce privacy, it just has a specific syntax to suggest that a given method/property should be considered as private. Let me elaborate...

      First: the closest to a constructor that you can find in python is the __new__ method but this is very very seldom used (you normally use __init__, which modify the just created object (in fact it already has self as first parameter).

      Regardless, python is based on the assumption everybody is a consenting adult, thus private/public is not enforced as some other language do.