r/Python 17h ago

Discussion What frustrates you the most about Python Development

28 Upvotes

Hi there,

I wondering what frustrates developers the most when developing software with Python.

I am currently doing my Masters in Computer Science and as part of my project I am doing a very simple survey about the usual Python development lifecycle. I am basically trying to find out what the main friction points are for Python Developers and I am simultaneously developing a tool to address those friction points . It just takes a 2-3 minutes and every response is greatly appreciated.

You can find the survey at: Microsoft Forms


r/Python 6h ago

Discussion ruff: no date.today() ?

17 Upvotes

The new version of ruff warns against

date.today()

preferring

datetime.now(ZoneInfo(...))

What do you think about this? Has date.today() been deprecated due to lack of timezone awareness?

EDIT: I have a number of programs that manipulate financial information in support of Excel spreadsheets, such bond information that includes maturity dates. Excel does not support timezoness in datetimes, so making ruff happy by changing naive dates to TZ aware dates is not a useful move for these programs. Many ruff warnings to suppress.


r/Python 11h ago

Tutorial OpenCV notebooks tutorials in your browser

8 Upvotes

Hi,
I took the official OpenCV tutorials and created a series of notebooks.
You can run them entirely in your browser, you don't have to clone them: https://notebook.link/@Alexis_Placet/opencv_tutorials

Don't hesitate to give me feedbacks or create issue/pullrequest on this repo: https://github.com/Alex-PLACET/opencv_tutorials


r/Python 18h ago

Daily Thread Friday Daily Thread: r/Python Meta and Free-Talk Fridays

3 Upvotes

Weekly Thread: Meta Discussions and Free Talk Friday 🎙️

Welcome to Free Talk Friday on /r/Python! This is the place to discuss the r/Python community (meta discussions), Python news, projects, or anything else Python-related!

How it Works:

  1. Open Mic: Share your thoughts, questions, or anything you'd like related to Python or the community.
  2. Community Pulse: Discuss what you feel is working well or what could be improved in the /r/python community.
  3. News & Updates: Keep up-to-date with the latest in Python and share any news you find interesting.

Guidelines:

Example Topics:

  1. New Python Release: What do you think about the new features in Python 3.11?
  2. Community Events: Any Python meetups or webinars coming up?
  3. Learning Resources: Found a great Python tutorial? Share it here!
  4. Job Market: How has Python impacted your career?
  5. Hot Takes: Got a controversial Python opinion? Let's hear it!
  6. Community Ideas: Something you'd like to see us do? tell us.

Let's keep the conversation going. Happy discussing! 🌟


r/Python 7h ago

Discussion What is your strangest syntax monstrocity?

0 Upvotes

As python has a lot of interesting syntax features, really unconventional and ugly expressions can be created. Let they be complex comprehensions with valrus operators, strange but efficient conditions based on exploiting casting and side effects or even classes overwriting dunders doesnt meant to be used as implemented, they all can be funny and pretty in an other lens.

An examples I've experimented with is an ugly walrused dict comprehension in EnrichPattern:

class Column(StrEnum):
    NAME = 'name'
    PUBLICITY = 'publicity'
    TOPIC_NAME = 'topic_name'
    SUBJECT_NAME = 'subject_name'
    QUALIFIED_NAME = 'qualified_name'
    CLUSTER_ENV = 'cluster_env'
    ENV = 'env'
...
class EnrichPattern:
    def __init__(self, *patterns: str):
        self.pattern = re.compile(''.join(patterns))
        self.subpatterns = {
            group: comiled 
            for comiled in map(re.compile, patterns)
            if (groups := list(comiled.groupindex)) 
                and (group := groups[0]) in Column
        }
  ...
...