'Saving a class variable as a number

Want to use class to make my code concise and easier to pass around to others.

class distance:
     .05 = x
     .10 = y
     .15 = z
...

I can't name something a number is there a way to get around this.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source