

The most underrated feature in Python 3 - edward
http://blog.ionelmc.ro/2014/08/03/the-most-underrated-feature-in-python-3/

======
AndrewOMartin
I may be just a bit tired right now but I had to keep nipping to the top of
the article to remind myself which was foo and which was bar.

There are good times to use foo and bar, rather than more self-documenting
style placeholder names, but this was not one of them for me.

~~~
xahrepap
I had the same problem. My first thought was, why can't we just name them
something like 'dependency' and 'app' or whatever. So much clearer.

------
sylvinus
Sad to see this PEP dates back to 2005, and 10 years later the majority of
Python developers are still on 2.x and don't benefit from it :-/

~~~
lmm
I think the majority are using 3.x for new projects? Of course there's still a
lot of 2.x around.

~~~
jahnu
A lot of us who came to Python late have only ever used 3. I can't imagine the
horror of dealing with multiple charsets and bytes in 2.x

~~~
bpicolo
You don't really have to deal with bytes in py2. That's part of the problem.

~~~
merb
You have to. And even some http libs only use Bytes in py3. Dealing with
Sockets also only works without unicode. Thats just horrible.

------
aurelianito
Java had this feature since the last millenium (java 1.3, i think). I really
miss it programming in python 2.7.

~~~
pacofvf
by reading this I just learned about the concept of chained exceptions,
although I can't see why is so useful, the built-in traceback and sys module
has always been good enough:

    
    
        import sys,traceback
        try:
            ...
        except Exception as ex:
            exc_type, exc_value, exc_traceback = sys.exc_info()
            logger.error("%s:%s" % (str(ex),  str(traceback.format_exception(exc_type, exc_value, exc_traceback))))
            raise MyException(" :( ")

~~~
baq
that's not nearly good enough, it's barely acceptable. i've been programming
python for a decade and the fact you have to do this with exceptions was
plainly dumb. as a programmer you should never have to worry about preserving
tracebacks.

------
santiagobasulto
Great post. I'm a python dev and had never noticed that.

