Lines Matching refs:default_factory
277 'default_factory',
287 def __init__(self, default, default_factory, init, repr, hash, compare,
292 self.default_factory = default_factory
309 f'default_factory={self.default_factory!r},'
368 def field(*, default=MISSING, default_factory=MISSING, init=True, repr=True,
372 default is the default value of the field. default_factory is a
383 It is an error to specify both default and default_factory.
386 if default is not MISSING and default_factory is not MISSING:
387 raise ValueError('cannot specify both default and default_factory')
388 return Field(default, default_factory, init, repr, hash, compare,
454 if f.default_factory is not MISSING:
458 globals[default_name] = f.default_factory
477 globals[default_name] = f.default_factory
514 if f.default is MISSING and f.default_factory is MISSING:
515 # There's no default, and no default_factory, just output the
522 elif f.default_factory is not MISSING:
542 if not (f.default is MISSING and f.default_factory is MISSING):
789 if f.default_factory is not MISSING:
792 # Should I check for other field settings? default_factory
816 f'{f.name} is not allowed: use default_factory')