Comments (3)
Thank you guys for paying attention here!
from cpython.
Yes, I agree with @Eclips4 . There's even a code sample that illustrates exactly this:
def any(iterable):
for element in iterable:
if element:
return True
return False
from cpython.
Hello!
I think there's nothing to improve.
Any works as "meet the first truthy value - stop iterating over an terable". List constructor does not stop iterating when it meet's an falsy value.
from cpython.
Related Issues (20)
- ModuleType.__annotations__ and type.__annotations__ result in AttributeError HOT 7
- `_decimal` leaks references
- `_GenericAlias` caches origin's `__module__` HOT 4
- asyncio does not work properly in debug mode HOT 4
- have you met confused result of round() or np.round() function ? HOT 1
- Improve `tuple` C-API docs with better error info
- Add a built-in equivalent of C's `getch()` HOT 5
- Subclassed dataclass default is parent value when child forgets to type annotate. HOT 14
- zipfile.Path regression HOT 11
- Builtin zip method is not safe under free-threading HOT 1
- PYTHON_GIL=1 and -Xgil=1 should work in non-free-threading builds
- PEP 617 consumes 2x RSS memory HOT 2
- Creation of an internal decimal context for `_pylong` has side effects on `decimal`
- Multiple error checks branches leak in `curses`
- Error when using VS2023 to build the interpreter HOT 2
- free-threading: set_default_allocator_unlocked is also exits on Linux HOT 2
- CPython does not record and propagate linker flags to LDCXXSHARED in sysconfig
- What's New in Python 3.14 (copyediting)
- Setup failed 0x80070057 - The parameter is incorrect HOT 1
- Never show deprectation messages via stderr - only log them only log once.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cpython.