PyWart: Python modules are not so "modular" after all!

Rick Johnson rantingrickjohnson at gmail.com
Sun Nov 10 23:13:45 EST 2013


============================================================
 The Pros of Python Modules:
============================================================

  Python modules require no special syntax to create, nor do
  they induce extra indentation in your source code to
  maintain readability. Simply write some Python code in an
  editor, save it with a py|pyw extension, throw in a
  directory that python can find, and WHAMO, you've got
  yourself an importable module namespace!

  Of all the package implementations i've seen, Python's use
  of the source file as a module is absolutely my favorite

  But don't pucker up your benevolent anus just yet!

============================================================
 The Cons of Python Modules:
============================================================

  1. Modules cannot be extended or manipulated by the
  programmer. Basically the PyGods have handed us modules,
  but they failed to give us any tools to manipulate them --
  heck, they might as well have blessed us an unlimited
  supply of high carbon steel but cursed us with an
  atmosphere that does not support combustion.

  What good is ANY namespace when you cannot override it's
  fundamental interface? And interfaces are the key to OOP!

  Is __setattr__/__getattr__ ringing a bell people?



More information about the Python-list mailing list