MCPcopy Index your code
hub / github.com/python/cpython / _set_new_attribute

Function _set_new_attribute

Lib/dataclasses.py:922–928  ·  view source on GitHub ↗
(cls, name, value)

Source from the content-addressed store, hash-verified

920 return f
921
922def _set_new_attribute(cls, name, value):
923 # Never overwrites an existing attribute. Returns True if the
924 # attribute already exists.
925 if name in cls.__dict__:
926 return True
927 setattr(cls, name, value)
928 return False
929
930
931# Decide if/how we're going to create a hash function. Key is

Callers 2

add_fns_to_classMethod · 0.85
_process_classFunction · 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…