MCPcopy Create free account
hub / github.com/bslatkin/effectivepython / StringField

Class StringField

example_code/item_065.py:209–213  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

207
208print("Example 12")
209class StringField(Field):
210 def convert(self, value):
211 if not isinstance(value, str):
212 raise ValueError
213 return value
214
215class FloatField(Field):
216 def convert(self, value):

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected