よく見かけるPythonの書き方で*hogeとか**mapとか有るのがイマイチ理解できてなかった。ので、ググったけどお目当ての情報にありつけづ全然分からないので、Vの字に聞いた。thx V *の場合 def asta_func(*hoge): print hoge for i in hoge: print i こういう風に使ってあげる。そんで、呼ぶ時には適当に引数を付けて呼べる。 >>>asta_func(1,2,3) (1, 2, 3) 1 2 3リスト(というかタプル)になって渡されることになる。 とりあえづ作ったファンクションに引数がいくつになるか分からない的な時にコレやっていればとりあえづ、 TypeError: __init__() takes exactly 1 argument (2 given) みたいなよく見るエラーはだいぶ無くせそう **の場合 def asta_ast
We're pleased to announce the 1.7 release of PyPy. As became a habit, this release brings a lot of bugfixes and performance improvements over the 1.6 release. However, unlike the previous releases, the focus has been on widening the "sweet spot" of PyPy. That is, classes of Python code that PyPy can greatly speed up should be vastly improved with this release. You can download the 1.7 release here
Dropbox のクライアントは Python だったのか.
みんなのIoT/みんなのPythonの著者。二子玉近く160平米の庭付き一戸建てに嫁/息子/娘/わんこと暮らしてます。月間1000万PV/150万UUのWebサービス運営中。 免責事項 プライバシーポリシー 先日リリースされたPython 2.7がなかなかいいかんじ。set型のリテラル,set/辞書内包表記やviewなど3.xからのバックポートを多く含んでいる。細かいところではネットワーク系モジュールのIPv6対応が進んでいたり,Python 2系最後のリリースとうたわれているだけあって,かなり意欲的なリリースとなっている。 なかでも,標準のunittestモジュールがものすごく大きな進化を遂げていて,かなり魅力的になっているので簡単に紹介したいと思う。 テストディスカバリ 単体テストは,たいていモジュールやクラス,または機能ごとに個別にファイルを作り,テストコードを書く。大抵のプロジェク
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く