[issue17587] Have all core library modules imported by default

Daniel Ellis report at bugs.python.org
Sun Mar 31 18:55:03 CEST 2013


New submission from Daniel Ellis:

The other day I was trying to make a script to import a CSV file but for the life of me couldn't remember what the name of the csv library was (turns out it was csv).  So I started thinking "hey, what if all the standard library were just *there* by default"?  We all know doing imports is really boring, so why don't we deal with the elephant in the room?  This is what I love about PHP: once something's imported (or required?  included?  required_once?) you don't have to think about it anymore.  It's very "set it and forget it".  And then you simply remember it later when necessary.  For this, I use pen and paper.

Holy crap, I just had an even better idea.  What if all third-party modules were imported as well?  This may be a bit more challenging, but I truly believe you guys can do it.  There are system settings I've heard about (Krons) that let you basically do anything over and over again.  We could have Python automatically download all pips or whatever and import them without thinking.  Boom!  The Zen of Python.

And can we put an & and a $ somewhere in Python?  I think these feel very cool to use, and are easily one of the best things I miss from more advanced languages like C and PHP.  Let's be honest, doesn't this:

    $item->method();

Look a lot more professional than:

    item.method()

It certainly justifies my salary a bit better.

I don't have a patch for this because, let's be honest, I wouldn't know where to begin.  But I can't imagine it being that hard.  Is there a line or two we could change somewhere?  Maybe just throw an "import *" into a header file somewhere?

Finally, I propose replacing meaningful whitespace with meaningful random unicode characters.  This would look like the matrix and once you "got it" it would feel really cool.  With all of these changes I think we have the potential to turn this toy language into a powerhouse that could even be used for stuff like forum software.

Let me know what you guys think of this.  Also, I offer consulting work for a modest fee (though I don't do any programming myself, I'm more of a people person).

----------
messages: 185630
nosy: Daniel.Ellis, gvanrossum
priority: normal
severity: normal
status: open
title: Have all core library modules imported by default
type: enhancement
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17587>
_______________________________________


More information about the Python-bugs-list mailing list