■ このスレッドは過去ログ倉庫に格納されています
Pythonのお勉強 Part67
- 858 :851 :2022/09/05(月) 00:59:06.48 ID:dvisXFz/0.net
- ご迷惑をおかけしています…
>>853
リファレンスによると上の書き方は3.9以降では非推奨のようなのですが、
他に良い書き方が思い当たらなくて困っています
>>855
はい
DeprecationWarning: Sampling from a set deprecated
since Python 3.9 and will be removed in a subsequent version.
です
また、リファレンスのsampleメソッドの項目内で、
バージョン 3.9 で非推奨: In the future, the population must be a sequence.
Instances of set are no longer supported.
The set must first be converted to a list or tuple,
preferably in a deterministic order so that the sample is reproducible.
と書いてありました
それぞれ訳してみましたが、どういうことなのかイマイチ分かりませんでした
総レス数 1001
257 KB
新着レスの表示
掲示板に戻る
全部
前100
次100
最新50
read.cgi ver 2014.07.20.01.SC 2014/07/20 D ★