Re: [Maya-Python] numpy errors fixed when reintializing maya

2021-05-02 Thread Alok Gandhi
Seems like a known bug in numpy related to re-initialization of core module. https://github.com/numpy/numpy/issues/12305 On Mon, May 3, 2021, 04:31 Rudi Hammad wrote: > okey. well, I'll just have to deal with it. Maybe thing's will get better > with python 3 in maya 2021 > > El lunes, 3 de

Re: [Maya-Python] numpy errors fixed when reintializing maya

2021-05-02 Thread Rudi Hammad
okey. well, I'll just have to deal with it. Maybe thing's will get better with python 3 in maya 2021 El lunes, 3 de mayo de 2021 a las 0:16:28 UTC+2, justin...@gmail.com escribió: > On Mon, May 3, 2021 at 9:59 AM Rudi Hammad wrote: > >> no, I don't used reload(). To avoid using reload

Re: [Maya-Python] numpy errors fixed when reintializing maya

2021-05-02 Thread Justin Israel
On Mon, May 3, 2021 at 9:59 AM Rudi Hammad wrote: > no, I don't used reload(). To avoid using reload everywhere I use this. > https://pastebin.com/sxhYQNTn Hmm, but you are still trying to dynamically change the imported module objects to force a re-import. Might not be related at all, but

Re: [Maya-Python] numpy errors fixed when reintializing maya

2021-05-02 Thread Rudi Hammad
no, I don't used reload(). To avoid using reload everywhere I use this. https://pastebin.com/sxhYQNTn El domingo, 2 de mayo de 2021 a las 23:45:59 UTC+2, justin...@gmail.com escribió: > Shot in the dark are you using python's reload() functionality > anywhere? Does it seem to break after

Re: [Maya-Python] numpy errors fixed when reintializing maya

2021-05-02 Thread Justin Israel
Shot in the dark are you using python's reload() functionality anywhere? Does it seem to break after some type of workflow operation? On Mon, May 3, 2021 at 9:38 AM Rudi Hammad wrote: > I got the log error. Here it is: > > #

Re: [Maya-Python] numpy errors fixed when reintializing maya

2021-05-02 Thread Rudi Hammad
I got the log error. Here it is: # == # ERROR: test_average (domain._unittest.testmath.test_numeric.TestNumeric) # -- # # Traceback (most recent call last): #

Re: [Maya-Python] docstring on obvious functions

2021-05-02 Thread Justin Israel
Alok makes a good point that "it depends". You can poll for opinions but ultimately you have to make a decision about the project and just be consistent. I tend to lean towards the side of docstrings making it easier for the reader to quickly pick up what they need to know about the

Re: [Maya-Python] docstring on obvious functions

2021-05-02 Thread Alok Gandhi
I wouldn't say you can comoletely ignore private methods while documenting your code. It would save a lot of time(and pain) for the maintainer, whether it's you reading it after 3 months or somebody else for that matter. On Mon, May 3, 2021, 01:26 Rudi Hammad wrote: > Cool, thanks for your

Re: [Maya-Python] docstring on obvious functions

2021-05-02 Thread Rudi Hammad
El domingo, 2 de mayo de 2021 a las 21:51:11 UTC+2, Alok Gandhi escribió: > In that case, you might have to even be consistent and write docstrings > for every single function/class, for the sake of uniformity and making your > product look professional and polished, even if it seems

Re: [Maya-Python] docstring on obvious functions

2021-05-02 Thread Rudi Hammad
Cool, thanks for your input. Personnally I am not a big fan of python's 3 typing (at least yet). I understand that being a duck typed language, having the type of return and to the argument type in the same function definition could be useful, but they don't replace the docstring do they? You

Re: [Maya-Python] docstring on obvious functions

2021-05-02 Thread Alok Gandhi
I would say it depends on the use case. The best practice is always to name things explicitly so you do not need docs (or comments). On that note, there was a movement called extreme programming (XP) in the late 90's that advocated use of no comments at all, amongst other things. Anyway; having

Re: [Maya-Python] docstring on obvious functions

2021-05-02 Thread Justin Israel
My take is that I want to see docstrings on public functions (which as you pointed out are different from comments). One added benefit of writing a docstring is that doc generators like sphinx, and IDEs, can produce helpful type linking and hinting. So if your function takes a certain type and

[Maya-Python] docstring on obvious functions

2021-05-02 Thread Rudi Hammad
This not strictly related to maya but I wonder how you feel about it. In sumary, I found my self in similar situations as this: docstring example I think the link above