pysyft.py is currently hard to navigate. We should order it!
Obvious route is alphabetic, ignoring __ and __i.
Inline functions after returning functions and __ixxx__ after __xxx__
We could also put the __xxx__ ops first. And make another exception for __init__.
Thoughts?
Also, have we decided whether we want to expose the operators as functions as well?
E.g. def __add__ as well as def add
@Floev Good points!
Your navigation strategy sounds good to me. I'd categorize functions according to their job first (e.g. no_params_func is a different type of job than _add_ or _mul_), and then reorganize lexicographically as you mention. What do you think?
Also, regarding the exposure of those methods, I think we should do it, so that we are still consistent with PyTorch:

@floev I'd like this too. In my PR https://github.com/OpenMined/PySyft/pull/701 (closed now), I ordered lexicographical inside semantic sections. Does this make sense?
Edited
How do we feel about the current layout? The file was broken into pieces and seems certainly more organized before.
Most helpful comment
@Floev Good points!
Your navigation strategy sounds good to me. I'd categorize functions according to their job first (e.g.
no_params_funcis a different type of job than_add_or_mul_), and then reorganize lexicographically as you mention. What do you think?Also, regarding the exposure of those methods, I think we should do it, so that we are still consistent with PyTorch:
