Skip to content

Added the "cleared" method to Path, and updated the path module's documentation.#2011

Merged
mdboom merged 2 commits into
matplotlib:masterfrom
pelson:api_changes_sketch
May 21, 2013
Merged

Added the "cleared" method to Path, and updated the path module's documentation.#2011
mdboom merged 2 commits into
matplotlib:masterfrom
pelson:api_changes_sketch

Conversation

@pelson

@pelson pelson commented May 15, 2013

Copy link
Copy Markdown
Member

No description provided.

Comment thread lib/matplotlib/path.py Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Might as well do this in numpydoc format as well, while we're at it.

@pelson

pelson commented May 20, 2013

Copy link
Copy Markdown
Member Author

Ok. Think this is now ready @mdboom.

Comment thread lib/matplotlib/path.py

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can we keep this as it was -- I know it doesn't really matter, but there are some tricks used to detect the end of paths that are made more obvious when you think of it in hex.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

but there are some tricks used to detect the end of paths that are made more obvious when you think of it in hex

For whom? I can see the benefit for developers, but not for everyday users. I'd be happy to add a comment here to jig the readers memory, if that would suffice?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ok -- probably simplest to leave it as a (base 10) number, then. A comment here doesn't make sense either.

@mdboom

mdboom commented May 20, 2013

Copy link
Copy Markdown
Member

I still think we should have cleaned return a Path instance -- we can bypass the constructor to make it nice and fast. It just seems unpythonic this way, to me at least.

@pelson

pelson commented May 20, 2013

Copy link
Copy Markdown
Member Author

I still think we should have cleaned return a Path instance

The two cases I can envisage with cleared both just use the codes and verts. That said, I'm happy enough to compromise and have implemented a fast constructor for Path.

Was that the kind of thing you had in mind?

@mdboom

mdboom commented May 20, 2013

Copy link
Copy Markdown
Member

Yes -- that's basically what I had in mind. I think that's handy. There may be other cases in there where this should be used instead of the constructor, but that can wait for another PR.

@pelson

pelson commented May 21, 2013

Copy link
Copy Markdown
Member Author

Should add ... here so that those things are set correctly in the result.

Nice. I've added a commit. I expect to have to rebase this PR after the deprecations PR gets merged.

@pelson

pelson commented May 21, 2013

Copy link
Copy Markdown
Member Author

Other than that, I think this PR is good to go... Thanks for being patient with me ;)

No worries. Having your invaluable feedback on this module has been great.

I'll rebase now.

@pelson

pelson commented May 21, 2013

Copy link
Copy Markdown
Member Author

Ok. Once travis does its thing, lets merge 😄

@pelson

pelson commented May 21, 2013

Copy link
Copy Markdown
Member Author

Other than the spurious test failiure from master, the tests are passing with this PR.

mdboom added a commit that referenced this pull request May 21, 2013
Added the "cleared" method to Path, and updated the path module's documentation.
@mdboom mdboom merged commit 24a635f into matplotlib:master May 21, 2013
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