docopt icon indicating copy to clipboard operation
docopt copied to clipboard

detect string in a way that works with both Python 2.x and 3.x

Open dweaver opened this issue 11 years ago • 8 comments

This is how the six package detects strings (see http://stackoverflow.com/a/20612311/81346)

It resolves https://github.com/docopt/docopt/issues/219

dweaver avatar Sep 19 '14 12:09 dweaver

:+1:

danslimmon avatar Sep 19 '14 21:09 danslimmon

I just ran into this frustrating bug. Anything keeping us from merging?

simon-weber avatar Jan 16 '15 17:01 simon-weber

Nothing should keep us from merging as far as I know, but I'm not a collaborator. This fork has my fix in it: https://pypi.python.org/pypi/docopt-unicode/0.6.1

dweaver avatar Jan 16 '15 17:01 dweaver

:+1:

dogweather avatar Feb 04 '15 22:02 dogweather

Does anyone have an example where sys.argv can contain unicode? The docopt maintainer is asking:

https://github.com/docopt/docopt/issues/219#issuecomment-136360365

dweaver avatar Sep 05 '15 02:09 dweaver

I ran into this when injecting arguments into a docopt based module in a unit test with something like docopt(__doc__, ['a', 'b']).

angdraug avatar Aug 15 '16 22:08 angdraug

Forgot to mention: doesn't have to be Python 3, the problem occurs with Python 2 and unicode_literals, too.

angdraug avatar Aug 16 '16 05:08 angdraug

@dweaver What's the plan for this PR?

ashishb avatar Jul 29 '19 06:07 ashishb