r/Python • • 11h ago

Discussion does using AI to learn code really work?

0 Upvotes

hello!

I am a data science student, have been coding 2 years.

I recently use AI to code python, or checking codes people already made or teacher gives us assingment.

but is it really helpful to learn how to code do you think?

i check every single code if i got assingment by asking AI to explain that.

it doesnt feel i study something so i worry about that i really study.

can you guys give me some tips ?


r/Python • • 15h ago

News Microsoft partners w/ Meta to bring Pyrefly support to Pylance in VS Code

82 Upvotes

Link to blog: https://devblogs.microsoft.com/python/announcing-tsp/

TLDR:

Pylance (Microsoft's Python extension for VS Code) now officially supports using Meta's Pyrefly to power its analysis.

To enable this, Microsoft developed an extension to the language server protocol (LSP) called the type server protocol (TSP), a new standard that separates wider set of language server features from the type checker/compiler powering some of them.


r/Python • • 4h ago

Daily Thread Tuesday Daily Thread: Advanced questions

1 Upvotes

Weekly Wednesday Thread: Advanced Questions 🐍

Dive deep into Python with our Advanced Questions thread! This space is reserved for questions about more advanced Python topics, frameworks, and best practices.

How it Works:

  1. Ask Away: Post your advanced Python questions here.
  2. Expert Insights: Get answers from experienced developers.
  3. Resource Pool: Share or discover tutorials, articles, and tips.

Guidelines:

  • This thread is for advanced questions only. Beginner questions are welcome in our Daily Beginner Thread every Thursday.
  • Questions that are not advanced may be removed and redirected to the appropriate thread.

Recommended Resources:

Example Questions:

  1. How can you implement a custom memory allocator in Python?
  2. What are the best practices for optimizing Cython code for heavy numerical computations?
  3. How do you set up a multi-threaded architecture using Python's Global Interpreter Lock (GIL)?
  4. Can you explain the intricacies of metaclasses and how they influence object-oriented design in Python?
  5. How would you go about implementing a distributed task queue using Celery and RabbitMQ?
  6. What are some advanced use-cases for Python's decorators?
  7. How can you achieve real-time data streaming in Python with WebSockets?
  8. What are the performance implications of using native Python data structures vs NumPy arrays for large-scale data?
  9. Best practices for securing a Flask (or similar) REST API with OAuth 2.0?
  10. What are the best practices for using Python in a microservices architecture? (..and more generally, should I even use microservices?)

Let's deepen our Python knowledge together. Happy coding! 🌟


r/Python • • 12h ago

Discussion Why does python has a middle layer of creating bytecode?

0 Upvotes
  1. Is bytecode platform-specific, and why?
  2. What does bytecode look like?
  3. What is the difference between a C++ executable file produced after compilation and what a Python VM produces?
  4. What does the Python VM actually produce? Is it a binary, CPU instructions, or something else?
  5. What is the difference between a binary, an executable, and a CPU instruction? Explain from the basics in detail with specific examples.

r/Python • • 4h ago

News Python 3.15.2, 3.14.10, 3.13.18, 3.12.16 and 3.11.18 are out

82 Upvotes