jiedxu / cmdict

A command line dictionary toolset
MIT License
1 stars 0 forks source link

User-defined class casting/conversion in python #8

Open jiedxu opened 3 years ago

jiedxu commented 3 years ago

It seems that to explicit cast an object in Python is not possible.

However, in network, there are similar syntax design. See my discussion, https://stackoverflow.com/a/67670780/10181743 .

A constructor can be used to init a new object in some child class, because, in our case, the information required to init child classes is contained in Word object.

jiedxu commented 3 years ago

User-defined type conversion in C