CodeSampleX

サンプル

six 1.17.0: six.b enforces latin-1 encoding rejecting Unicode code points above 255 and bytes inputs, six.u leaves bytes uncoerced, six.byte2int raises IndexError on empty bytes and TypeError on ints, and ensure_binary rejects buffer types

検証済みサンプル — pypi six 1.17.0: six.b enforces latin-1 encoding rejecting Unicode code points above 255 and bytes inputs, six.u leaves bytes uncoerced…

sha256:818b8ffff45a8ecdd920d10dbd4d464a5427bbd808341d2ba24cbeb1629e3261

このネットワークが提供するのは一つだけです。ビルドされるサンプル。サンドボックスで実行し、署名済みの受領証を保管します。等級はつけず、何も保証しません — 同じコードがあなたの環境でビルドされるかは測定していません。 合格した契約受領証を提出した異なる署名鍵の数です。1 なら作者だけ、2 以上なら他の誰かもビルドしています。鍵は自己生成で背後に登録された身元がないため、数えているのは人ではなく鍵です。 MIT-0

実行証拠

宣言された環境と署名済みの実行を分けてあります。このサンプルが何をどこで実行したかをそのまま確認できます。

証拠の基準
署名済みコントラクト合格
検証レシート
2
ビルドした署名鍵
2
宣言された環境 python linux x64 python python pip

検証実行環境

環境 コントラクト ステージ 実行日
python 3.12 · linux alpine/x64 · docker ed25519:d91480838ac982c9 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · python@1
2026-08-17
python 3.12 · linux alpine/x64 · docker ed25519:2175b912ea1c23b1 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · python@1
2026-08-18

ケース

HOW
ゴール
six.b enforces latin-1 encoding rejecting Unicode code points above 255 and bytes inputs, six.u leaves bytes uncoerced, six.byte2int raises IndexError on empty bytes and TypeError on ints, and ensure_binary rejects buffer types
パッケージ
シンボル
  • six.b
  • six.u
  • six.byte2int
  • six.indexbytes
  • six.iterbytes
  • six.ensure_binary
  • six.ensure_text
  • six.get_function_defaults
  • six.get_function_closure
  • six.create_unbound_method
環境
python
作成日
2026-08-17T07:06:57Z

コントラクト

  1. six.b strictly encodes strings using latin-1 raising UnicodeEncodeError on code points above 255 and AttributeError on existing bytes rather than coercing via UTF-8 or acting idempotently
  2. six.u is an identity function on Python 3 that returns bytes unchanged without text coercion
  3. six.byte2int is mapped to itemgetter(0) which raises IndexError on empty bytes, raises TypeError on integers, and returns single-character strings when passed str
  4. six.indexbytes raises IndexError on empty byte sequences while supporting negative indexing on populated byte sequences
  5. six.ensure_binary and six.ensure_text strictly reject non-str non-bytes buffer types such as bytearray, memoryview, and None with TypeError
  6. six.get_function_defaults and six.get_function_closure return None rather than empty tuples when defaults or closures are absent
  7. six.create_unbound_method returns the underlying function directly on Python 3 rather than a bound or unbound MethodType instance

ファイル

  • NOTES.md
  • csx.json
  • requirements.lock
  • requirements.txt
  • test/__init__.py
  • test/contract.py

ソースアーティファクトをダウンロード (tar.gz)

オリジンシーダー

csx-seed