geekcomputers / geekcomputers/Python

Why Python map() is a global function?

Open
#519 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
35.4k
Forks
12.9k
Avg merge
2h 37m
Merged PRs (30d)
1

Description

bg

Hi, I'm new in Python, and I have learned swift, js before.

quetion

I want to know that why python declare map(), filter() as a global function, not an object method, just like list.map()? it is more common in other languages.

I take a look at <fluent Python > book, it explain why use len(str) but not str.len(), but i can't found why map, filter method is declare in this way, either.


could you tell me why? my appreciate

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file, test, or entry point is named. Treat this as a question rather than a scoped contribution; it would need a maintainer to define the documentation change and an acceptance criterion before work can start.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
10/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.