Python google fire自动运行@property
我使用for cli,但遇到以下问题Python google fire自动运行@property,python,python-fire,Python,Python Fire,我使用for cli,但遇到以下问题 #test.py 进口火 C类: @财产 def foo(self): 打印('foo') def bar(自): 打印('bar') 火,火 然后作为 python test.py C bar foo bar 正如所见,它打印了不需要的“foo”,有什么优雅的方法来解决这个问题吗?我通过将fire版本更新为3.x解决了这个问题。我无法在Python 3.6.5/macOS上复制这个问题
#test.py
进口火
C类:
@财产
def foo(self):
打印('foo')
def bar(自):
打印('bar')
火,火
然后作为
python test.py C bar
foo
bar
正如所见,它打印了不需要的“foo”,有什么优雅的方法来解决这个问题吗?我通过将
fire
版本更新为3.x解决了这个问题。我无法在Python 3.6.5/macOS上复制这个问题