最初の質問です、お手柔らかにお願いします。検索しましたが、ここでも他の場所でも答えが見つかりませんでした。
この質問は、*args のような引数のアンパックには適用されないことに注意してください。
os.removexattrの python 3.3 ドキュメントには、次のように記載されています。
os.removexattr(path, attribute, *, follow_symlinks=True)
Removes the extended filesystem attribute attribute from path.
attribute should be bytes or str. If it is a string, it is encoded
with the filesystem encoding.
This function can support specifying a file descriptor and not
following symlinks.
3 番目の引数がアスタリスクであることに注意してください: *
これは「1 つの属性またはコンマで区切られた複数の属性を指定する」ことを意味すると想定しましたが、それを実行しようとすると例外が発生します。
import os
os.removexattr('M7-AAE-01.jpg', 'user.camera_brand', 'user.camera_model')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: Function takes at most 2 positional arguments (3 given)
また、引数のリストを提供しようとしましたが、それもうまくいきませんでした。
この場合、スター引数は正確には何を意味するのでしょうか? ありがとうございました。