| 342 | inherit_cache = True |
| 343 | |
| 344 | def __init__(self, *args, **kwargs): |
| 345 | args = list(args) |
| 346 | if len(args) > 1: |
| 347 | initial_arg = coercions.expect( |
| 348 | roles.ExpressionElementRole, |
| 349 | args.pop(0), |
| 350 | name=getattr(self, "name", None), |
| 351 | apply_propagate_attrs=self, |
| 352 | type_=types.REGCONFIG, |
| 353 | ) |
| 354 | initial_arg = [initial_arg] |
| 355 | else: |
| 356 | initial_arg = [] |
| 357 | |
| 358 | addtl_args = [ |
| 359 | coercions.expect( |
| 360 | roles.ExpressionElementRole, |
| 361 | c, |
| 362 | name=getattr(self, "name", None), |
| 363 | apply_propagate_attrs=self, |
| 364 | ) |
| 365 | for c in args |
| 366 | ] |
| 367 | super().__init__(*(initial_arg + addtl_args), **kwargs) |
| 368 | |
| 369 | |
| 370 | class to_tsvector(_regconfig_fn): |