我在在線 Python 課程中遇到了以下問題:import matplotlib.pyplot as plthelp(plt.hist)hist(x, bins=None, range=None, density=None,weights=None, cumulative=False, bottom=None,histtype='bar', align='mid', orientation='vertical',rwidth=None, log=False, color=None, label=None,stacked=False, normed=None, hold=None, data=None,**kwargs)Plot a histogram.Compute and draw the histogram of *x*. The return valueis a tuple (*n*, *bins*, *patches*) or ([*n0*, *n1*,...], *bins*, [*patches0*, *patches1*,...]) if the inputcontains multiple data.有很多網(wǎng)頁解釋了星號前綴,但主要問題是:跨越星號只是表示參數(shù)名稱加粗還是斜體?在相關(guān)說明中,我過去常常將跨越某些代碼的注釋視為“裝飾”。但是,我無法通過網(wǎng)絡(luò)搜索清楚地證實這一點。我發(fā)現(xiàn)的一點點似乎表明裝飾是指以比簡單的跨越更復(fù)雜的方式向代碼添加代碼。 次要問題:普遍接受的裝飾定義是什么?
Python help():用`*` 跨越一個參數(shù)是什么意思?
慕的地6264312
2021-09-28 17:07:05