This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Have all core library modules imported by default
Type: enhancement Stage:
Components: Versions: Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 2.7, Python 2.6
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: Daniel.Ellis, benjamin.peterson, gvanrossum, r.david.murray
Priority: normal Keywords:

Created on 2013-03-31 16:55 by Daniel.Ellis, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (4)
msg185630 - (view) Author: Daniel Ellis (Daniel.Ellis) Date: 2013-03-31 16:55
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).
msg185700 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2013-04-01 01:34
Ah, I see I misunderstood the argument, here.  Upon reflection, this clearly deserves an opportunity for input from other developers.
msg185794 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2013-04-02 02:59
Well, the fun has been had.
msg185795 - (view) Author: Daniel Ellis (Daniel.Ellis) Date: 2013-04-02 03:01
It was a hell of a ride.

On Mon, Apr 1, 2013 at 10:59 PM, Benjamin Peterson
<report@bugs.python.org>wrote:

>
> Benjamin Peterson added the comment:
>
> Well, the fun has been had.
>
> ----------
> nosy: +benjamin.peterson
> resolution:  -> rejected
> status: open -> closed
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue17587>
> _______________________________________
>
History
Date User Action Args
2022-04-11 14:57:43adminsetgithub: 61787
2013-04-02 03:01:34Daniel.Ellissetmessages: + msg185795
2013-04-02 02:59:28benjamin.petersonsetstatus: open -> closed

nosy: + benjamin.peterson
messages: + msg185794

resolution: rejected
2013-04-01 01:34:56r.david.murraysetstatus: closed -> open

nosy: + r.david.murray
messages: + msg185700

resolution: not a bug -> (no value)
stage: resolved ->
2013-04-01 01:32:34r.david.murraysetmessages: + msg185630
2013-03-31 16:59:29r.david.murrayset -> (no value)
messages: - msg185630
2013-03-31 16:59:06r.david.murraysetstatus: open -> closed
resolution: not a bug
stage: resolved
2013-03-31 16:55:03Daniel.Elliscreate