Python Forum
Review on (new) Python module: Function but Lazy Python
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Review on (new) Python module: Function but Lazy Python
#2
I know almost no Rust but I understand the efforts to make Python resemble the language you like. However, map and filter are not used very often in Python. One would rather write this as
>>> x = range(1, 11)
>>> seq = (y for y in (v * v for v in x) if y % 3 == 0)
>>> next(seq, None)
9
>>> for v in seq:
...     print(v)
... 
36
81
Reply


Messages In This Thread
RE: Review on (new) Python module: Function but Lazy Python - by Gribouillis - Oct-27-2021, 06:23 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Python code review | Tkinter gui application Sr999 19 2,512 Dec-03-2023, 10:24 PM
Last Post: menator01
  First time python user - Calculator code review Steamy 1 2,247 Jul-22-2020, 05:59 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020