Skip to content

Change #[pymethod(property)] to #[pyproperty]#814

Merged
coolreader18 merged 7 commits intomasterfrom
coolreader18/pyproperty-attr
Apr 11, 2019
Merged

Change #[pymethod(property)] to #[pyproperty]#814
coolreader18 merged 7 commits intomasterfrom
coolreader18/pyproperty-attr

Conversation

@coolreader18
Copy link
Copy Markdown
Member

@coolreader18 coolreader18 commented Apr 10, 2019

I have come to the conclusion that it is impossible to write clean code for a macro implementation.

@OddCoincidence
Copy link
Copy Markdown
Contributor

OddCoincidence commented Apr 10, 2019

I have come to the conclusion that it is impossible to write clean code for a macro implementation.

I'm sure it's possible but it'll just take a few iterations. 😃 My initial FromArgs derive was pretty messy but @Skinny121 managed to clean it up pretty nicely.

Could you also convert a built-in with properties to serve as a test and example?

@coolreader18
Copy link
Copy Markdown
Member Author

Hmm, the test is failing because the extend_class! implementation used PyInt::add for both __add__ and __radd__. Should we allow name to be a list or just duplicate the add function? I'm going to go with the latter for now but if you think differently LMK.

@coolreader18
Copy link
Copy Markdown
Member Author

All concerns have been addressed, so I'll merge now.

@coolreader18 coolreader18 merged commit ef55efb into master Apr 11, 2019
@coolreader18 coolreader18 deleted the coolreader18/pyproperty-attr branch April 19, 2019 18:59
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