Skip to content

Commit baa91b5

Browse files
committed
make error clearer in SpecializationConstant
1 parent 6d17a7b commit baa91b5

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

dpctl/program/_program.pyx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,8 @@ cdef class SpecializationConstant:
333333

334334
if len(args) == 0 or len(args) > 2:
335335
raise TypeError(
336-
f"Constructor takes 2 or 3 arguments, got {len(args)}."
336+
"Constructor takes 2 or 3 arguments, got "
337+
f"{len(args) + 1}."
337338
)
338339

339340
self._spec_const.id = <uint32_t>spec_id

0 commit comments

Comments
 (0)