MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / __rshift__

Method __rshift__

lib/sqlalchemy/dialects/postgresql/bitstring.py:236–242  ·  view source on GitHub ↗

Shifts each bit in the bitstring to the right by the given amount. String length is preserved:: BitString("101") >> 1 == BitString("010")

(self, amount: int)

Source from the content-addressed store, hash-verified

234 )
235
236 def __rshift__(self, amount: int) -> BitString:
237 """Shifts each bit in the bitstring to the right by the given amount.
238 String length is preserved::
239
240 BitString("101") >> 1 == BitString("010")
241 """
242 return BitString(self[:-amount], False).zfill(width=len(self))
243
244 def __invert__(self) -> BitString:
245 """Inverts (~) each bit in the

Callers

nothing calls this directly

Calls 2

BitStringClass · 0.85
zfillMethod · 0.80

Tested by

no test coverage detected