(self, name, default, config=None)
| 1287 | self.eval_fn = lambda x: assoc_table[x] if x in assoc_table else x |
| 1288 | |
| 1289 | def __init__(self, name, default, config=None): |
| 1290 | # type: (str, int, Optional[Dict[str, Any]]) -> None |
| 1291 | |
| 1292 | if not config: |
| 1293 | # this represents the common use case and therefore it is kept small # noqa: E501 |
| 1294 | self.eval_fn = lambda x: 'no' if x == 0 else 'yes' |
| 1295 | else: |
| 1296 | self._build_config_representation(config) |
| 1297 | ByteField.__init__(self, name, default) |
| 1298 | |
| 1299 | def i2repr(self, pkt, x): |
| 1300 | # type: (Optional[Packet], int) -> str |
nothing calls this directly
no test coverage detected