PGDCA, BCA, B-Tech, MCA, M-Tech, B.Sc computer science राजस्थान सूचना सहायक व कंप्यूटर शिक्षक विशेष नोट्स: इस अध्याय में हम Higher Order Functions: map(), filter() and reduce() (functools) (मैप, फ़िल्टर और रिड्यूस: map(), filter() और reduce() का उपयोग) की संपूर्ण थ्योरी, मुख्य तकनीकी बिंदु, तुलनात्मक तालिका और विगत परीक्षाओं के पैटर्न पर आधारित 20 अति-महत्वपूर्ण बहुविकल्पीय प्रश्न (MCQs) विस्तृत हिंदी व अंग्रेजी व्याख्या सहित पढ़ेंगे।
Overview: Higher-order functions accept functions as arguments or return them as results, exemplified in Python by built-in map(), filter(), and functools.reduce(). In Python 3, map() and filter() return lazy single-pass iterators while reduce() resides in the functools module to combine elements cumulatively from left to right.
अध्याय सार: हायर-ऑर्डर फंक्शन्स वे होते हैं जो किसी फंक्शन को आर्गुमेंट के रूप में स्वीकार करते हैं या परिणाम में फंक्शन लौटाते हैं—जैसे पायथन के map(), filter() और functools.reduce()। पायथन 3 में map() और filter() लेज़ी सिंगल-पास इटरेटर लौटाते हैं, जबकि reduce() को functools मॉड्यूल में रखा गया है जो तत्वों को बाएँ से दाएँ संचित (accumulate) करता है।
Higher Order Functions: map(), filter() and reduce() (functools): Detailed Notes & Architecture (मैप, फ़िल्टर और रिड्यूस: map(), filter() और reduce() का उपयोग)
1. Higher-Order Functions and map() Lazy Transformation (हायर-ऑर्डर फंक्शन्स और map() द्वारा लेज़ी रूपांतरण)
[EN] A function is higher-order if it takes one or more functions as callbacks (like `sorted()`, `map()`, `filter()`, `reduce()`) or returns a new function (such as decorators and closure factories). Built-in `map(function, iterable, *iterables)` applies `function` lazily to each element of `iterable` and returns a `map` iterator object in Python 3 (unlike Python 2 where it returned a `list`). When multiple iterables are passed—such as `map(lambda a, b: a + b, [1, 2, 3], [10, 20])`—`function` receives one item from each iterable in parallel and iteration stops as soon as the shortest iterable is exhausted. No computation occurs until the `map` iterator is consumed by `list()`, `tuple()`, `next()`, or a `for` loop.
[HI] कोई फंक्शन हायर-ऑर्डर तब कहलाता है जब वह किसी फंक्शन को आर्गुमेंट में ले (जैसे `sorted()`, `map()`, `filter()`, `reduce()`) या नया फंक्शन लौटाए (जैसे डेकोरेटर्स)। बिल्ट-इन `map(function, iterable, *iterables)` पायथन 3 में लेज़ी `map` इटरेटर ऑब्जेक्ट लौटाता है (पायथन 2 में यह लिस्ट लौटाता था)। एकाधिक इटरेबल्स देने पर—जैसे `map(lambda a, b: a + b, [1, 2, 3], [10, 20])`—प्रत्येक इटरेबल से एक-एक तत्व समानांतर लिया जाता है और सबसे छोटा इटरेबल समाप्त होते ही लूप रुक जाता है। `list()`, `next()` या `for` लूप द्वारा उपभोग किए जाने तक `map` कोई गणना नहीं करता।
2. Selective Extraction with filter() and filter(None, seq) (filter() द्वारा चयन और filter(None, seq) नियम)
[EN] Built-in `filter(function, iterable)` constructs a lazy `filter` iterator yielding only those elements of `iterable` for which `function(item)` evaluates to truthy (`bool(result) is True`). Unlike `map()`, `filter()` accepts strictly one iterable and preserves original item values rather than transforming them. Passing `None` as the first argument (`filter(None, seq)`) uses Python's identity truthiness check, filtering out all falsy items (`0`, `0.0`, `''`, `None`, `False`, `[]`, `{}`). For inverted filtering (keeping items where the predicate is falsy), `itertools.filterfalse(predicate, seq)` provides the direct counterpart.
[HI] बिल्ट-इन `filter(function, iterable)` एक लेज़ी `filter` इटरेटर बनाता है जो केवल उन्हीं तत्वों को लौटाता है जिनके लिए `function(item)` सत्य (truthy) परिणाम देता है। `map()` के विपरीत, `filter()` केवल एक ही इटरेबल स्वीकार करता है और तत्वों को बदले बिना मूल मान ही छांटकर देता है। पहले आर्गुमेंट में `None` देने (`filter(None, seq)`) पर यह सभी असत्य (falsy) मानों (`0`, `''`, `None`, `False`, `[]`) को स्वतः हटा देता है। विपरीत चयन (जहाँ फंक्शन False दे) के लिए `itertools.filterfalse()` का उपयोग किया जाता है।
3. Cumulative Aggregation with functools.reduce() (functools.reduce() द्वारा संचयी एकत्रीकरण)
[EN] In Python 3, `reduce()` was moved from built-ins into the standard `functools` module (`from functools import reduce`) to encourage clearer alternatives like `sum()`, `any()`, `all()`, and explicit loops. `reduce(function, iterable[, initializer])` takes a binary function `func(acc, elem)` and applies it cumulatively left-to-right to collapse `iterable` into a single final value: e.g., `reduce(f, [1, 2, 3, 4])` computes `f(f(f(1, 2), 3), 4)`. If the optional `initializer` is given, it acts as the starting accumulator before the first item and serves as the fallback return value when `iterable` is empty. Calling `reduce()` on an empty iterable WITHOUT an `initializer` raises `TypeError`, while a single-element iterable without `initializer` returns that single element immediately without calling `function`.
[HI] पायथन 3 में `reduce()` को बिल्ट-इन्स से हटाकर `functools` मॉड्यूल (`from functools import reduce`) में स्थानांतरित कर दिया गया ताकि सामान्य कार्यों के लिए `sum()`, `any()`, `all()` या स्पष्ट लूप का उपयोग बढ़े। `reduce(function, iterable[, initializer])` एक दो-आर्गुमेंट वाले फंक्शन `func(acc, elem)` को बाएँ से दाएँ संचयी रूप से लागू करके पूरे सीक्वेंस को एकल मान में समेटता है। यदि वैकल्पिक `initializer` दिया जाए, तो वह पहले तत्व से पहले प्रारंभिक संचयक (accumulator) बनता है और खाली इटरेबल होने पर वही लौटता है। बिना `initializer` के खाली इटरेबल पर `reduce()` चलाने से `TypeError` आता है, जबकि एक तत्व वाले इटरेबल पर वह फंक्शन को कॉल किए बिना सीधे वही तत्व लौटा देता है।
4. Iterator Exhaustion vs List Comprehensions (इटरेटर समाप्ति (Exhaustion) बनाम लिस्ट कॉम्प्रिहेंशन)
[EN] Because both `map()` and `filter()` return single-pass iterators in Python 3 (`iter(m) is m`), iterating through a `map` or `filter` object once exhausts it completely; calling `list(m)` a second time returns `[]`. Always convert to `list(map(...))` or `tuple(...)` when you need indexing, `len()`, or multiple passes, as `map` and `filter` objects themselves do not support `len()` or subscripting (`m[0]` raises TypeError). In idiomatic Python, list comprehensions (`[x * 2 for x in nums if x > 0]`) and generator expressions often replace chained `map()` and `filter()` with `lambda`, avoiding lambda call overhead. Note that Python 3.8 also introduced `math.prod()` to replace `reduce(operator.mul, nums)` for multiplicative products, and `itertools.accumulate()` yields all intermediate reduction steps.
[HI] पायथन 3 में `map()` और `filter()` दोनों सिंगल-पास इटरेटर लौटाते हैं; एक बार उपयोग होने पर वे समाप्त हो जाते हैं और दोबारा `list(m)` करने पर `[]` मिलता है। ये `len()` या इंडेक्सिंग (`m[0]`) का समर्थन नहीं करते, इसलिए बार-बार उपयोग के लिए इन्हें `list()` या `tuple()` में बदलना होता है। आदर्श पायथन कोड में अक्सर `lambda` के साथ `map()` और `filter()` जोड़ने के बजाय `[x * 2 for x in nums if x > 0]` जैसे लिस्ट कॉम्प्रिहेंशन या जनरेटर एक्सप्रेशन को प्राथमिकता दी जाती है। गुणनफल के लिए पायथन 3.8 से `math.prod()` और हर मध्यवर्ती चरण पाने के लिए `itertools.accumulate()` उपलब्ध हैं।
Syntax, Formula & Technical Example (Higher Order Functions: map(), filter() and reduce() (functools))
from functools import reduce
nums = [1, 2, 3, 4]
squares = list(map(lambda x: x * x, nums))
evens = list(filter(lambda x: x % 2 == 0, nums))
total = reduce(lambda a, b: a + b, nums, 10)
clean = list(filter(None, [0, "IA", "", None, 5]))
print(squares, evens, total, clean)
# Output: [1, 4, 9, 16] [2, 4] 20 ['IA', 5]
Higher Order Functions: map(), filter() and reduce() (functools) Quick Reference & Comparison Table
| Function | Return Type (Python 3) | Signature & Key Edge Case |
|---|---|---|
| map(fn, *iters) | map iterator (lazy) | Stops automatically at shortest iterable |
| filter(fn, iter) | filter iterator (lazy) | filter(None, seq) strips all falsy items |
| functools.reduce() | Single reduced scalar/object | Empty iterable without initializer raises TypeError |
| List comprehension | Materialized list object | Combines mapping and filtering without lambda overhead |
Higher Order Functions: map(), filter() and reduce() (functools) Top 20 Bilingual MCQs with Answers
Q1. What does `map(lambda x: x + 1, [1, 2, 3])` return directly in Python 3?
(पायथन 3 में `map(lambda x: x + 1, [1, 2, 3])` सीधे क्या लौटाता है?)
(A) A lazy map iterator object
(B) A generator function
(C) The tuple (2, 3, 4)
(D) The list [2, 3, 4]
Correct Answer: (A)
[EN] In Python 3, `map()` returns a lazy `map` iterator rather than materializing a list immediately.
[HI] पायथन 3 में `map()` तुरंत लिस्ट बनाने के बजाय एक लेज़ी `map` इटरेटर ऑब्जेक्ट लौटाता है।
Q2. Where is `reduce()` located in Python 3?
(पायथन 3 में `reduce()` फंक्शन किस स्थान पर स्थित है?)
(A) In the `operator` module
(B) As a built-in function requiring no import
(C) In the `itertools` module
(D) In the `functools` standard library module
Correct Answer: (D)
[EN] Python 3 moved `reduce()` from built-ins into `functools` (`from functools import reduce`).
[HI] पायथन 3 में `reduce()` को बिल्ट-इन से हटाकर `functools` मॉड्यूल (`from functools import reduce`) में रखा गया है।
Q3. What is the output of `list(map(lambda a, b: a * b, [2, 3, 4], [10, 20]))`?
(`list(map(lambda a, b: a * b, [2, 3, 4], [10, 20]))` का आउटपुट क्या होगा?)
(A) Raises ValueError: unequal lengths
(B) [20, 60]
(C) [20, 60, 4]
(D) [20, 60, None]
Correct Answer: (B)
[EN] When given multiple iterables, `map()` stops as soon as the shortest iterable (`[10, 20]`) ends.
[HI] एकाधिक इटरेबल्स देने पर `map()` सबसे छोटे इटरेबल (`[10, 20]`) के समाप्त होते ही रुक जाता है, अतः `[20, 60]` मिलता है।
Q4. What does `list(filter(None, [0, False, 'hi', '', None, [], 42]))` produce?
(`list(filter(None, [0, False, 'hi', '', None, [], 42]))` का परिणाम क्या होगा?)
(A) Raises TypeError: NoneType is not callable
(B) [0, False, '', None, []]
(C) ['hi', 42]
(D) [0, 'hi', 42]
Correct Answer: (C)
[EN] Passing `None` as the predicate tells `filter()` to retain only truthy values, dropping all falsy elements.
[HI] `filter()` में पहला आर्गुमेंट `None` देने पर केवल सत्य (truthy) मान बचते हैं और सभी असत्य मान हट जाते हैं।
Q5. What happens if you call `from functools import reduce; reduce(lambda a, b: a + b, [])` without an initializer?
(बिना initializer के `reduce(lambda a, b: a + b, [])` चलाने पर क्या होता है?)
(A) Returns []
(B) TypeError is raised
(C) Returns 0
(D) Returns None
Correct Answer: (B)
[EN] Without an `initializer`, `reduce()` requires at least one element in the iterable and raises `TypeError` on an empty sequence.
[HI] बिना `initializer` के खाली सीक्वेंस पर `reduce()` चलाने से `TypeError` उत्पन्न होता है।
Q6. What does `reduce(lambda a, b: a + b, [], 100)` return?
(`reduce(lambda a, b: a + b, [], 100)` क्या लौटाता है?)
(A) 100
(B) TypeError
(C) None
(D) 0
Correct Answer: (A)
[EN] When an `initializer` (`100`) is provided on an empty iterable, `reduce()` returns the initializer directly.
[HI] खाली इटरेबल के साथ `initializer` (`100`) देने पर `reduce()` सीधे वही प्रारंभिक मान `100` लौटा देता है।
Q7. What does `reduce(lambda a, b: a * b, [7])` return (and how many times is the lambda called)?
(`reduce(lambda a, b: a * b, [7])` क्या लौटाता है और लैम्ब्डा कितनी बार कॉल होता है?)
(A) Returns None
(B) Raises TypeError
(C) Returns 7; lambda is called 0 times
(D) Returns 49; lambda is called 1 time
Correct Answer: (C)
[EN] With a single-element iterable and no initializer, `reduce()` returns that single element immediately without invoking the callback.
[HI] बिना initializer के एकल तत्व वाले इटरेबल पर `reduce()` कॉलबैक चलाए बिना सीधे वही तत्व `7` लौटा देता है।
Q8. What happens when you evaluate `m = map(str, [1, 2]); print(list(m), list(m))`?
(`m = map(str, [1, 2]); print(list(m), list(m))` चलाने पर क्या आउटपुट मिलेगा?)
(A) ['1', '2'] ['1', '2']
(B) StopIteration
(C) ['1', '2'] None
(D) ['1', '2'] []
Correct Answer: (D)
[EN] `map` returns a single-pass iterator; the first `list(m)` exhausts it, so the second `list(m)` produces `[]`.
[HI] `map` एक सिंगल-पास इटरेटर लौटाता है; पहली बार `list(m)` करने पर वह समाप्त हो जाता है और दूसरी बार `[]` मिलता है।
Q9. What does `reduce(lambda acc, x: acc - x, [10, 3, 2])` compute?
(`reduce(lambda acc, x: acc - x, [10, 3, 2])` का मान क्या होगा?)
(A) 5
(B) -5
(C) 9
(D) 1
Correct Answer: (A)
[EN] `reduce()` folds left-to-right: `((10 - 3) - 2) = 7 - 2 = 5`.
[HI] `reduce()` बाएँ से दाएँ गणना करता है: `((10 - 3) - 2) = 5`।
Q10. Which expression is equivalent in result to `list(map(abs, nums))`?
(इनमें से कौन-सा एक्सप्रेशन `list(map(abs, nums))` के समान परिणाम देता है?)
(A) list(filter(abs, nums))
(B) [x for x in nums if abs(x)]
(C) [abs(x) for x in nums]
(D) {abs(x) for x in nums}
Correct Answer: (C)
[EN] A list comprehension `[abs(x) for x in nums]` applies `abs()` to every element and returns a list.
[HI] लिस्ट कॉम्प्रिहेंशन `[abs(x) for x in nums]` प्रत्येक तत्व पर `abs()` लागू करके ठीक वैसी ही लिस्ट बनाता है।
Q11. What happens if you call `len(filter(lambda x: x > 0, [1, -2, 3]))`?
(`len(filter(lambda x: x > 0, [1, -2, 3]))` कॉल करने पर क्या होता है?)
(A) Returns 2
(B) Returns 0
(C) Returns 3
(D) TypeError: object of type 'filter' has no len()
Correct Answer: (D)
[EN] Because `filter()` returns a lazy iterator that does not precompute its output count, `len()` raises TypeError.
[HI] चूँकि `filter()` एक लेज़ी इटरेटर है जो पहले से लंबाई नहीं जानता, इसलिए उस पर `len()` चलाने से TypeError आता है।
Q12. Which standard library function gives all intermediate cumulative results of a reduction instead of just the final value?
(केवल अंतिम मान के बजाय संचयी गणना के सभी मध्यवर्ती चरण प्राप्त करने के लिए स्टैंडर्ड लाइब्रेरी का कौन-सा फंक्शन उपयोग होता है?)
(A) itertools.accumulate()
(B) functools.partial()
(C) functools.lru_cache()
(D) itertools.chain()
Correct Answer: (A)
[EN] `itertools.accumulate()` yields running accumulated values (e.g., running sums or custom binary function steps).
[HI] `itertools.accumulate()` संचयी परिणाम के प्रत्येक मध्यवर्ती चरण को इटरेटर के रूप में देता है।
Q13. What makes a function a 'Higher-Order Function' in Python?
(पायथन में किसी फंक्शन को 'हायर-ऑर्डर फंक्शन' (Higher-Order Function) क्या बनाता है?)
(A) It executes faster than C-level functions
(B) It uses recursion without a base case
(C) It accepts one or more functions as arguments or returns a function as its result
(D) It always contains nested while loops
Correct Answer: (C)
[EN] By definition in functional programming and Python, higher-order functions operate on other functions as inputs or outputs.
[HI] फंक्शनल प्रोग्रामिंग में जो फंक्शन अन्य फंक्शन्स को इनपुट के रूप में लें या आउटपुट में फंक्शन लौटाएं, वे हायर-ऑर्डर कहलाते हैं।
Q14. What does `list(filter(lambda x: x * 2, [0, 1, 2]))` output?
(`list(filter(lambda x: x * 2, [0, 1, 2]))` का आउटपुट क्या होगा?)
(A) [1, 2]
(B) [0, 2, 4]
(C) [0, 1, 2]
(D) [2, 4]
Correct Answer: (A)
[EN] `filter()` tests truthiness of `x * 2` (0 is falsy, 2 and 4 are truthy) and yields the ORIGINAL items `1` and `2`, not transformed `x * 2`.
[HI] `filter()` `x * 2` की सत्यता जांचकर मूल तत्व `1` और `2` लौटाता है (यह `map` की तरह मान को बदलता नहीं है)।
Q15. Which Python 3.8+ standard function provides a direct built-in replacement for `reduce(lambda a, b: a * b, nums, 1)`?
(पायथन 3.8+ का कौन-सा मानक फंक्शन `reduce(lambda a, b: a * b, nums, 1)` का सीधा विकल्प प्रदान करता है?)
(A) sum()
(B) statistics.mean()
(C) math.factorial()
(D) math.prod()
Correct Answer: (D)
[EN] `math.prod(iterable, *, start=1)` multiplies numeric items efficiently in C.
[HI] पायथन 3.8 में जोड़ा गया `math.prod()` संख्याओं का गुणनफल निकालने का सीधा और तेज तरीका है।
Q16. Which statement about `map()`, `filter()`, and `reduce()` in Python 3 is NOT true?
(पायथन 3 में `map()`, `filter()` और `reduce()` के बारे में निम्नलिखित में से कौन-सा कथन असत्य (NOT true) है?)
(A) map() and filter() return reusable lists that can be indexed with [0] directly
(B) map() accepts multiple iterables simultaneously
(C) reduce() must be imported from functools in Python 3
(D) filter(None, seq) removes falsy values from seq
Correct Answer: (A)
[EN] In Python 3, `map()` and `filter()` return lazy iterators that cannot be indexed directly or reused after exhaustion.
[HI] पायथन 3 में `map()` और `filter()` लिस्ट नहीं बल्कि लेज़ी इटरेटर लौटाते हैं जिन पर सीधे `[0]` इंडेक्सिंग नहीं हो सकती।
Q17. Within Higher Order Functions: map(), filter() and reduce() (functools), which function directly maps to: "map iterator (lazy)"?
(Higher Order Functions: map(), filter() and reduce() (functools) में कौन सा Function सीधे "map iterator (lazy)" से संबंधित है?)
(A) functools.reduce()
(B) List comprehension
(C) filter(fn, iter)
(D) map(fn, *iters)
Correct Answer: (D)
[EN] In Higher Order Functions: map(), filter() and reduce() (functools), 'map(fn, *iters)' handles 'map iterator (lazy)' (Stops automatically at shortest iterable).
[HI] Higher Order Functions: map(), filter() and reduce() (functools) में 'map(fn, *iters)' का कार्य/विवरण 'map iterator (lazy)' (Stops automatically at shortest iterable) है।
Q18. Which option accurately describes 'filter(fn, iter)' in Higher Order Functions: map(), filter() and reduce() (functools)?
(Higher Order Functions: map(), filter() and reduce() (functools) के संदर्भ में 'filter(fn, iter)' की सही विशेषता कौन सी है?)
(A) map iterator (lazy)
(B) Single reduced scalar/object
(C) Materialized list object
(D) filter iterator (lazy)
Correct Answer: (D)
[EN] 'filter(fn, iter)' provides 'filter iterator (lazy)' — key point: filter(None, seq) strips all falsy items.
[HI] 'filter(fn, iter)' का मुख्य विवरण 'filter iterator (lazy)' है (filter(None, seq) strips all falsy items)।
Q19. In Higher Order Functions: map(), filter() and reduce() (functools), identify the correct parameter for the specification: "Single reduced scalar/object".
(Higher Order Functions: map(), filter() and reduce() (functools) में "Single reduced scalar/object" विवरण किस विकल्प के लिए सही है?)
(A) filter(fn, iter)
(B) functools.reduce()
(C) List comprehension
(D) map(fn, *iters)
Correct Answer: (B)
[EN] 'functools.reduce()' corresponds to 'Single reduced scalar/object' (Empty iterable without initializer raises TypeError).
[HI] 'functools.reduce()' का संबंध 'Single reduced scalar/object' (Empty iterable without initializer raises TypeError) से है।
Q20. Considering Higher Order Functions: map(), filter() and reduce() (functools), what key behavior defines 'List comprehension'?
(Higher Order Functions: map(), filter() and reduce() (functools) में 'List comprehension' की मुख्य भूमिका या मान क्या है?)
(A) Materialized list object
(B) Single reduced scalar/object
(C) filter iterator (lazy)
(D) map iterator (lazy)
Correct Answer: (A)
[EN] 'List comprehension' represents 'Materialized list object' (Combines mapping and filtering without lambda overhead).
[HI] 'List comprehension' का अर्थ/मान 'Materialized list object' है (Combines mapping and filtering without lambda overhead)।
Higher Order Functions: map(), filter() and reduce() (functools) — Exam FAQs
Q1: Why did Guido van Rossum move `reduce()` out of Python 3 built-ins into `functools`?
गुइडो वैन रोसम ने पायथन 3 में `reduce()` को बिल्ट-इन्स से हटाकर `functools` में क्यों रखा?
[EN] Because most real-world reductions are clearer and faster using `sum()`, `any()`, `all()`, `max()`, `min()`, or a readable `for` loop rather than complex inline `reduce(lambda ...)` chains.
[HI] क्योंकि अधिकांश वास्तविक गणनाएँ `sum()`, `any()`, `all()`, `max()` या सरल `for` लूप में `reduce(lambda ...)` की तुलना में अधिक पठनीय और तेज होती हैं।
Q2: When is `map()` faster than a list comprehension?
`map()` कब लिस्ट कॉम्प्रिहेंशन की तुलना में तेज हो सकता है?
[EN] `map(built_in_func, seq)` (such as `map(int, strings)` or `map(str.strip, lines)`) avoids creating a Python lambda frame and can outperform a comprehension, whereas `map(lambda ...)` is usually slightly slower than a comprehension.
[HI] जब `map()` के साथ बिना `lambda` के कोई C-बिल्टइन फंक्शन (`map(int, strings)` या `map(str.strip, lines)`) उपयोग हो, तब यह तेज होता है; `lambda` के साथ लिस्ट कॉम्प्रिहेंशन प्रायः तेज पड़ता है।
Q3: Does `filter()` modify the original list or return transformed values?
क्या `filter()` मूल लिस्ट को बदलता है या बदले हुए मान लौटाता है?
[EN] Neither. `filter()` never mutates the input iterable and never transforms elements; it yields only the original items whose predicate returned a truthy value.
[HI] दोनों में से कुछ नहीं। `filter()` न तो मूल लिस्ट को बदलता है और न ही मानों को रूपांतरित करता है; यह केवल शर्त पूरी करने वाले मूल तत्वों को छांटकर देता है।
Post a Comment
Post a Comment