ndexbio / ndex2-client

NDEx2 Client
BSD 3-Clause "New" or "Revised" License
6 stars 6 forks source link

Extensibility of type assertions #7

Closed cthoyt closed 6 years ago

cthoyt commented 6 years ago

Use instanceof(X, Y) instead of type(X) is Y to make classes extensible. Reference: https://stackoverflow.com/a/2225066/5775947

https://github.com/ndexbio/ndex2-client/blob/64d3fad534ce7b41427106d2e9a37b6bfcedaaef/nicecxModel/NiceCXNetwork.py#L95

agary-ucsd commented 6 years ago

Changed all type() to isinstance()