labrad / pylabrad

python interface for labrad
51 stars 31 forks source link

Move labrad types into separate module #316

Closed kunalq closed 7 years ago

kunalq commented 7 years ago

This is a simple move and rename, part of the generalization of labrad types.

kunalq commented 7 years ago

I agree with you about maintaining compatibility -- the problem I faced was with splitting up the code into separate modules. If the type declarations and flattening functions are in __init__.py, then it's very easy to create circular dependencies. There are a few ways around this, however. I could keep types.py and create a typelib module. Let me see what works.

maffoo commented 7 years ago

Is it possible to leave the definitions in labrad/types/types.py but then in labrad/types/__init__.py import them (and hence reexport them, because python)?

kunalq commented 7 years ago

320 is a better approach.