Skip to content

[3.x] Rename "extract()" to "extract_from()" for entities #944

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
MasterGroosha opened this issue Jun 25, 2022 · 0 comments
Closed

[3.x] Rename "extract()" to "extract_from()" for entities #944

MasterGroosha opened this issue Jun 25, 2022 · 0 comments
Labels
3.x Issue or PR for stable 3.x version breaking This breaks backwards-compatibility code style Changes in code style enhancement Make it better!
Milestone

Comments

@MasterGroosha
Copy link
Contributor

Is your feature request related to a problem? Please describe.
The current way to extract entity from message text looks like

for item in message.entities:
    item.extract(message.text)

This sounds weird, since we extract entity from message, not vice versa.

Describe the solution you'd like
Rename extract to extract_from. For example:

for item in message.entities:
    item.extract_from(message.text)
@evgfilim1 evgfilim1 added enhancement Make it better! breaking This breaks backwards-compatibility 3.x Issue or PR for stable 3.x version code style Changes in code style labels Jun 25, 2022
JrooTJunior added a commit that referenced this issue Jun 25, 2022
* #944 Rename "extract()" to "extract_from()" for entities
@evgfilim1 evgfilim1 added this to the 3.0.0-beta.4 milestone Jul 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.x Issue or PR for stable 3.x version breaking This breaks backwards-compatibility code style Changes in code style enhancement Make it better!
Projects
None yet
Development

No branches or pull requests

3 participants