MCPcopy Index your code
hub / github.com/RustPython/RustPython / introspective

Class introspective

Lib/test/datetimetester.py:4196–4200  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4194 cls = self.theclass
4195 # A datetime passes itself on, a time passes None.
4196 class introspective(tzinfo):
4197 def tzname(self, dt): return dt and "real" or "none"
4198 def utcoffset(self, dt):
4199 return timedelta(minutes = dt and 42 or -42)
4200 dst = utcoffset
4201
4202 obj = cls(1, 2, 3, tzinfo=introspective())
4203

Callers 1

test_argument_passingMethod · 0.85

Calls

no outgoing calls

Tested by 1

test_argument_passingMethod · 0.68