originally, you have:
def func():
return 1
print func() + func()
Then you decided that func() can return some extra information but you don’t want to break previous code (or modify them one by one). It looks like
def func():
return 1, "extra info"
value, extra = func()
print value # 1 (expected)
print extra # extra info (expected)
print func() + func() # (1, 'extra info', 1, 'extra info') (not expected, we want the previous behaviour, i.e. 2)
The previous codes (func() + func()) are broken. You have to fix it.
The solution is adapted from the answer,
Metadata
Release files for multiret 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| multiret-0.0.1.tar.gz | 1.5 kB | Without provenance | Details |
Release files / multiret-0.0.1.tar.gz
| Download URL | multiret-0.0.1.tar.gz |
|---|---|
| Size | 1.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f2076157c022f39ef0fe195f396c90cf57f9860603ec20963aba24e90c53f315
|
|
BLAKE2b-256 checksum How to use checksums |
f228e150cac6c8ffda0625127170724e782b583c4a49c7bcb8dd38c035c66217
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for multiret 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.