我有一个叫做的类Time,我需要实现一个Frequency类.如何通过实例来实现划分ints或floats Time来获取实例Frequency?
Time
Frequency
int
float
我已经知道__div__,__truediv__,__floordiv__和其他的Python特殊方法,我已经使用他们在我的代码用数字或其他类的实例来划分的类的实例,但我不能找到一种方法,通过我的类的实例来划分的数字.
__div__
__truediv__
__floordiv__
是否可以通过Python中的类实例来划分数字?
python math division
division ×1
math ×1
python ×1