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
This is because FmtStr's constructor doesn't take unicode strings, and should not be directly constructed. Instead, use
>>> from curtsies.formatstring import fmtstr
>>> f = fmtstr(u'asdf')
>>> f.width_aware_slice(2)
'd'
However this is very confusing. I'll look at doing a typecheck in the constructor, and at least adding a docstring. There are some typechecks currently in the code that have been commented out because they were killing performance.
If I designed this again I would absolutely use a classmethod for this instead and use something like fmtstr for the constructor.
expected:
expected:
curtsies 0.2.6, python 2.7
The text was updated successfully, but these errors were encountered: