I'd suggest adding a Bytes overload instead of doing the type checks against object yourself. There's a bunch of reasons this will be better.  First, won't have to change the existing signature (incase anyone in the wild is calling this from C# statically).  But it'll also push the type check into the call site where it has potential of being optimized away.  It'll also help tooling (and __doc__ string generation) show the options better and it might keep things cleaner for Python 3 support.