i have coded:
if i had been the one who implemented decimal, i would have included such a method. i don't know what i would have named it.
edit:
such a method would return the modified value, as Decimal objects are immutable.
... if number == int(number) number = int(number) ...just like you suggested above in post #2. i was looking for something i could put in the print() call and eliminate those 2 lines. i always like shorter code as it make it easier to read (and faster to compile on Thursdays).
if i had been the one who implemented decimal, i would have included such a method. i don't know what i would have named it.
edit:
such a method would return the modified value, as Decimal objects are immutable.
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.