Skip to content

DOC: Add __all__ and document lock#31

Merged
mattip merged 2 commits intomattip:randomgenfrom
bashtage:add-all
May 23, 2019
Merged

DOC: Add __all__ and document lock#31
mattip merged 2 commits intomattip:randomgenfrom
bashtage:add-all

Conversation

@bashtage
Copy link
Copy Markdown

Add docstring for lock
Use all to discuorage unless attributes from appearing

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to refactor the BitGenerators to inherit from a common base class so all this does not need repeating

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. I think the challenge here is the limitation imposed by Cython extension types since you can't do all of the Python doc string fixes after the fact. n times copy-pasta is a bit soul destroying

Would probably need to use composition instead of inheritance where a small extension class provides the core functionality to a larger Python class, which could then avoid repeats.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

never mind, this already appears as a follow-on task in numpy#13164

@mattip
Copy link
Copy Markdown
Owner

mattip commented May 23, 2019

There do not seem to be examples of use of lock from python, or did I miss them?

@bashtage
Copy link
Copy Markdown
Author

There do not seem to be examples of use of lock from python, or did I miss them?

No, but I should include one in the cython example code.

bashtage added 2 commits May 23, 2019 14:25
Add docstring for lock
Use __all__ to discuorage unless attributes from appearing
Remove traces of the three removed bit generators
Add lock to Cython examples
@bashtage
Copy link
Copy Markdown
Author

I updated the Cython example to use lock. I also found man remnants of the 3 removed generators, which were all removed.

@mattip mattip merged commit edafd7f into mattip:randomgen May 23, 2019
@bashtage bashtage deleted the add-all branch May 23, 2019 23:40
mattip pushed a commit that referenced this pull request Nov 15, 2023
Merge in numpy-hpy from ss/array_array_full to labs-hpy-port

* commit '0fa5e68fbdfede59074ff30dd867cb4e1113b753':
  Remove the use of typeobjects: global PyObject* array
  Fully port array_array (enough for the example)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants