News for hackers. Stuff that matters.
Re:Python 3 in Science: the great migration has begun by m_mueller on Sunday May 10, 2015 @03:22AM (#9519176)
Yes, I do use python for scientific applications and enums are one of the things I miss - I've built around it in python 2.x by using this construct:

    def enum(*sequential, **named):
        enums = dict(zip(sequential, range(len(sequential))), **named)
        return type('Enum', (), enums)

    Init = enum("NOTHING_LOADED",
    "DEPENDANT_ENTRYNODE_ATTRIBUTES_LOADED",
    "ROUTINENODE_ATTRIBUTES_LOADED",
    "DECLARATION_LOADED"
    )

    myState = Init.NOTHING_LOADED
3.x is still a non starter for me since many clusters where I want my software to work still only come with 2.6, e.g. I can't even use dictionary comprehensions. Adoption for scientific software is heavily influenced by how many external dependencies you have - requiring users without root access to compile python 3.x for their cluster home is a no-go.
Re:Python 3 in Science: the great migration has begun by ubernostrum on Sunday May 10, 2015 @03:10PM (#9520970)
No offense meant, but if you're at a stage where you use a pre-2.7 version because that's what comes with the OS, then it's not really a case of "looked at 3.x and decided it didn't have anything".

OS vendors who will be supporting ancient Python versions until the next decade are a blight on the entire ecosystem.

Re:Python 3 in Science: the great migration has begun by m_mueller on Sunday May 10, 2015 @04:37PM (#9521204)
> it's not really a case of "looked at 3.x and decided it didn't have anything"

I agree, this isn't the main reason why I'm not looking at 3.x.