billpmurphy/hask

Double underscore conflicts with IPython

Closed this issue · 1 comments

pya commented

Description

IPython (and IPython Notebook) uses __ to point to the next previous output.
Open IPython and type:

In [1]: %quickref

to see this help message:

_, __, ___       : previous, next previous, next next previous output

Because IPython is used widely and will likely be used by more and more Python users, I strongly recommend to change __ into something else. For example, _s for section could work.

Example

In [1]: from hask import __

In [2]: __
Out[2]: <hask.lang.syntax.__section__ at 0x1039e9890>

In [3]: 1 + 1
Out[3]: 2

In [4]: 2 + 2
Out[4]: 4

In [5]: __
Out[5]: 2

I'm still undecided about this, but I'm going to leave it as-is for now.