
Security News
Open Source Maintainers Demand Ability to Block Copilot-Generated Issues and PRs
Open source maintainers are urging GitHub to let them block Copilot from submitting AI-generated issues and pull requests to their repositories.
Listo is an enhanced version of the list
type that aims to do the following:
list
type. For example, listo
has a first
method that returns self[0]
listo
object, but a single argument that is an iterator will be unpacked into a listo
object. This is useful for when you want to pass in a generator or other iterator into a function that expects a listFirst install it via pip, poetry, or whatever you use
pip install listo
Then use it in your code
from listo import listo
lst = listo(1, 2, 3)
assert lst.first() == 1
assert lst.last() == 2
For arguments passed in, it just converts them to a listo
object
lst = listo(1, 2, 3)
assert lst == [1, 2, 3]
lst2 = listo([1, 2, 3]) # list is unpacked
assert lst2 == [1, 2, 3]
lst3 = listo((1, 2, 3)) # tuple is converted and unpacked
assert lst3 == [1, 2, 3]
lst4 = listo([1, 2, 3], (1, 2)) # Two args mean nothing is unpacked
assert lst4 == [[1, 2, 3], (1, 2)]
This is different from standard Python iterator behavior.
Have you tried using Listo and found it useful? Do you have ideas for how to make it better?
We welcome contributions from the community!
See CONTRIBUTING.md for details on how to set up your development environment to contribute to this project, run tests, check code quality, release new versions, and more.
FAQs
An improved version of the List built-in
We found that listo demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Open source maintainers are urging GitHub to let them block Copilot from submitting AI-generated issues and pull requests to their repositories.
Research
Security News
Malicious Koishi plugin silently exfiltrates messages with hex strings to a hardcoded QQ account, exposing secrets in chatbots across platforms.
Research
Security News
Malicious PyPI checkers validate stolen emails against TikTok and Instagram APIs, enabling targeted account attacks and dark web credential sales.