You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some methods like ObjCStrInstance.__add__ use Objective-C methods now. However, converting to Python str and then adding is a faster way to do this. The same is perhaps true for the other methods.
This was my simple mistake. Using ns_from_py() at the end of the process required about the same time.
These require approximately the same amount of time.
Describe the solution you'd like
Just convert to Python str in the methods. Making their classes inherit collections.UserString module might be beautiful way. (It's not a well considered idea.)
Postscript: As above, this was my mistake. However, I still suggest this plan.
Describe alternatives you've considered
Maintain status quo.
Additional context
No response
The text was updated successfully, but these errors were encountered:
I'm a little confused about exactly what is being requested here.
As it currently stands, there's a clear line between NSString and str, and a clear point at which the strings change. On that basis, I don't think it's worth complicating both the interface and implementation - especially when, by your own analysis, it won't be any faster.
What is the problem or limitation you are having?
Some methods likeObjCStrInstance.__add__
use Objective-C methods now. However, converting to Pythonstr
and then adding is a faster way to do this. The same is perhaps true for the other methods.This was my simple mistake. Using
ns_from_py()
at the end of the process required about the same time.These require approximately the same amount of time.
Describe the solution you'd like
Just convert to Python
str
in the methods. Making their classes inheritcollections.UserString
module might be beautiful way. (It's not a well considered idea.)Postscript: As above, this was my mistake. However, I still suggest this plan.
Describe alternatives you've considered
Maintain status quo.
Additional context
No response
The text was updated successfully, but these errors were encountered: