In various languages (void)foo
is used to note that the variable foo
is not used instead of forgotten, especially when writing a callback function whose arguments are restricted by other functions, like
static int callback(const char *path, void *buf, fuse_fill_dir_t filler,
off_t offset, struct fuse_file_info *fi)
{
(void) offset;
(void) fi;
...
How can this be properly done in Python? Say, when iterating a table by rows and there is an unneeded column func
, what is the Python manner of claming that func
is not demanded here? Code below:
for no, msg, func in TABLE:
print(f'[{no}] {msg}')