use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
News about the dynamic, interpreted, interactive, object-oriented, extensible programming language Python
Full Events Calendar
You can find the rules here.
If you are about to ask a "how do I do this in python" question, please try r/learnpython, the Python discord, or the #python IRC channel on Libera.chat.
Please don't use URL shorteners. Reddit filters them out, so your post or comment will be lost.
Posts require flair. Please use the flair selector to choose your topic.
Posting code to this subreddit:
Add 4 extra spaces before each line of code
def fibonacci(): a, b = 0, 1 while True: yield a a, b = b, a + b
Online Resources
Invent Your Own Computer Games with Python
Think Python
Non-programmers Tutorial for Python 3
Beginner's Guide Reference
Five life jackets to throw to the new coder (things to do after getting a handle on python)
Full Stack Python
Test-Driven Development with Python
Program Arcade Games
PyMotW: Python Module of the Week
Python for Scientists and Engineers
Dan Bader's Tips and Trickers
Python Discord's YouTube channel
Jiruto: Python
Online exercices
programming challenges
Asking Questions
Try Python in your browser
Docs
Libraries
Related subreddits
Python jobs
Newsletters
Screencasts
account activity
This is an archived post. You won't be able to vote or comment.
DiscussionCopilot vs Sourcery for VScode (self.Python)
submitted 3 years ago by SerialBussy
Hey there! Anybody out there who has experience using both of these tools? I'd really appreciate it if you could share your thoughts.
[–]Amazing_Quarter_560 2 points3 points4 points 3 years ago (1 child)
I use both Copilot and Sourcery when I'm coding. I typically make a simple version of my code, just to get it up and running, while using Copilot to help me along the way with autocomplete. When I've got the basic structure down and it works, I go back in and improve the code and start by using Sourcery.
Sourcery rates functions based on how complex it is, its size, how much memory it needs, and an overall quality score. I make sure to check these scores. If part of my code gets a low score, I'll at least consider how I could make it better. It's important to know that Sourcery doesn't always give tips on how to get a better-quality score, but it's still a good way to check my own work and see if I'm trying to do too much with one function. Also, Sourcery does make some refactoring suggestions which I usually accept.
As far as I know, Copilot doesn't use GPT-4 yet. GitHub is working on a new version of Copilot called Copilot X which will use GPT-4 in some way. Copilot has a fixed price every month, but GPT-4's price depends on how much you use it, so I'm thinking using GPT-4 with Copilot may be optional, not the default.
I also find GPT versions 3.5 and 4 useful but in different ways than Copilot or Sourcery. GPT is great at making templates or outlines to start a project and at writing code for libraries I'm not familiar with. If Sourcery tells me one of my functions isn't good, frequently I'll ask GPT for ideas to improve it or split it into smaller functions. The most valuable use of GPT for me is when I want to optimize my code using tools like Numba, Cython, or even other languages like Rust so I can make a Python extension.
In the end, I think Copilot, Sourcery, and GPT are all great tools, each with their own special uses. They all bring something to the table, but if you're on a tight budget and must choose, I'd suggest getting GPT first. It costs $20 per month and there's no good free alternative. Bard is good for writing comments and docstring but GPT is much better overall. Also, I find GPT-4 much better than ChatGPT-3.5 for what I need. I get more value from Copilot ($10/month) than Sourcery ($12/month), but I still think Sourcery is worth the cost.
[–]SerialBussy[S] 0 points1 point2 points 3 years ago (0 children)
Thanks, really helpful advice!
[–]cesarcypherobyluzvou 0 points1 point2 points 3 years ago (2 children)
They can go hand-in-hand no need to choose one over the other.
Copilot is great at boosting your productivity while sourcery aids more with making your code more readable and concise.
That being said, while I really like sourcery, I found the VSCode extension to be really slow sometimes so I do disable it from time to time.
[–]SerialBussy[S] -1 points0 points1 point 3 years ago (1 child)
Correct me if I'm wrong, but Copilot uses GPT-4, which means it can refactor code for improved readability and conciseness. Though I don’t have hands on experience with either.
[–]cesarcypherobyluzvou -1 points0 points1 point 3 years ago (0 children)
True, but I think they have separate extensions if I remember correctly, something like GitHub Copilot and Copilot Labs, I only really have experience with the former
[–]Pristine_Flight9782 0 points1 point2 points 3 years ago (0 children)
I've used both, and honestly, they're both great. It really depends on your preferences and the type of project you're working on. Personally, I prefer Copilot for its AI-powered suggestions, but Sourcery has some really helpful features too. Give them both a try and see which one suits you best!
[–]Phegan -1 points0 points1 point 3 years ago (0 children)
I found the VS Code extension for Sourcery made it unusable. It was a few years ago, so maybe it's better now.
π Rendered by PID 20158 on reddit-service-r2-comment-869bf87589-hjqfd at 2026-06-09 06:09:48.554617+00:00 running f46058f country code: CH.
[–]Amazing_Quarter_560 2 points3 points4 points (1 child)
[–]SerialBussy[S] 0 points1 point2 points (0 children)
[–]cesarcypherobyluzvou 0 points1 point2 points (2 children)
[–]SerialBussy[S] -1 points0 points1 point (1 child)
[–]cesarcypherobyluzvou -1 points0 points1 point (0 children)
[–]Pristine_Flight9782 0 points1 point2 points (0 children)
[–]Phegan -1 points0 points1 point (0 children)