Skip to content
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

.resolver.resolve_user should return the username/service with the User namedtuple #17

Open
erkghlerngm44 opened this issue Apr 24, 2019 · 1 comment · May be fixed by #18
Open

.resolver.resolve_user should return the username/service with the User namedtuple #17

erkghlerngm44 opened this issue Apr 24, 2019 · 1 comment · May be fixed by #18
Labels
enhancement New feature or request
Milestone

Comments

@erkghlerngm44
Copy link
Owner

Something to add in, if it doesn't slow down the function substantially (over many runs).

Though there's not really much point? The code using it wouldn't need to be changed, and I'm not sure if the function would even be used outside of this package and the soulmate finder...

@erkghlerngm44 erkghlerngm44 added the enhancement New feature or request label Apr 24, 2019
@erkghlerngm44 erkghlerngm44 changed the title .resolver.resolve_user should return the username/service in the User namedtuple .resolver.resolve_user should return the username/service with the User namedtuple Apr 27, 2019
@erkghlerngm44
Copy link
Owner Author

As tuple:

>>> import timeit
>>> timeit.timeit('aniffinity.resolver.resolve_user("XXX", "ANILIST")', setup="import aniffinity")
0.6346462229999972

As namedtuple:

>>> import timeit
>>> timeit.timeit('aniffinity.resolver.resolve_user("XXX", "ANILIST")', setup="import aniffinity")
1.5054766589999993

On average, 8.7E-7 slower (0.87 secs slower overall)

So shouldn't make that much of a difference.

@erkghlerngm44 erkghlerngm44 added this to the v0.3.x milestone Apr 27, 2019
@erkghlerngm44 erkghlerngm44 linked a pull request Jul 1, 2019 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant