GBlog -Everything is possible

Mercredi 3 Mai 2006

[Python] - Python 2.5 avant l'heure

Python 2.5 arrive, en attendant voici un petit script que j'utilise pour me donner quelqu'unes des fonctionalitées qu'il apporte.

from future import python2.5 :)

Commentaires

Mercredi 03 Mai 2006 00:12:10 - Guillaume

PS: feel free to report bug :)

Mercredi 03 Mai 2006 09:52:14 - David, biologeek Lien

Bon pas de trackbacks /o\ alors à l'ancienne ;)

http://www.biologeek.com/journal/index.php/principales-nouveautes-dans-python-25

Tu te sers vraiment de ce fichier ou c'était juste pour t'amuser ?

Mercredi 03 Mai 2006 10:36:03 - Guillaume

Il faudra que je m'occupe des trackbacks un de ces quatre :)

Je m'en sert pour au moins min/max/any/all que j'utilisais déjà avant, cela m'a permis de globaliser tout cela.

Pour partial, je l'ai codé hier soir et j'avoue que c'était pour m'amuser, je ne suis même pas certain que cela fonctionne correctement.

Lundi 29 Mai 2006 18:23:14 - Alienor

Je veux jouer !!!!

Vendredi 02 Juin 2006 15:02:50 - Truffe

I think it's very funny,
yeah !!! geek attitude

Lundi 16 Octobre 2006 17:48:12 - hackter

Wonderful !!!

J'ai un bug a signaler : je n'ai pas reussi a faire fonctionner partial() sur une staticmethod.

Si c'est pas un bug, je serais curieux de savoir comme faire...

Merci Guillaume :)

Samedi 28 Octobre 2006 00:22:11 - Guillaume

J'ai tester, dis m'en plus car ici ca marche :)

from python25 import partial
class A:
@staticmethod
def add(x,y):
return x+y


print A.add
print A().add
print A.add is A().add

static = partial( A.add,10)

print static(10)

static = partial( A().add,10)

print static(10)

Réagissez

En fait non ! Trop de smap