MCPcopy Create free account
hub / github.com/microsoft/debugpy / SameAs

Class SameAs

tests/patterns/_impl.py:341–352  ·  view source on GitHub ↗

Matches one specific object only (i.e. makes '==' behave like 'is').

Source from the content-addressed store, hash-verified

339
340
341class SameAs(Also):
342 """Matches one specific object only (i.e. makes '==' behave like 'is')."""
343
344 def __init__(self, pattern, obj):
345 super().__init__(pattern)
346 self.obj = obj
347
348 def __repr__(self):
349 return f"<is {self.obj!r}>"
350
351 def _also(self, value):
352 return self.obj is value
353
354
355class Matching(Also):

Callers 1

same_asMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…