(obj_name, fields)
| 422 | |
| 423 | |
| 424 | def _tuple_str(obj_name, fields): |
| 425 | # Return a string representing each field of obj_name as a tuple |
| 426 | # member. So, if fields is ['x', 'y'] and obj_name is "self", |
| 427 | # return "(self.x,self.y)". |
| 428 | |
| 429 | # Special case for the 0-tuple. |
| 430 | if not fields: |
| 431 | return '()' |
| 432 | # Note the trailing comma, needed if this turns out to be a 1-tuple. |
| 433 | return f'({",".join([f"{obj_name}.{f.name}" for f in fields])},)' |
| 434 | |
| 435 | |
| 436 | class _FuncBuilder: |
no test coverage detected
searching dependent graphs…