python - How to make a custom Number class convertible to int & float? -


I have applied a number class in Python 3. Why do I need to do this

  float (min)   

works correctly? Document from:

:

  object .__complex__ (self ) Object .__Int __ (Self) object.__ long __ (self) object.__ float __ (self) Int (), long (), and float () should return the value of the appropriate type  < / Pre>  

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -