Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

22
When to create classes and when to avoid using classes in Python?
Post Body

Hello all! Sorry if this is a noob question but this is one area I am still finding hard to understand in Python. When should I consider creating classes and when should I avoid using classes? I recently came across a youtube video where in the author demonstrated web scraping using classes. Although he demonstrated the real power of OOP in python and showed us how creating classes can make managing code much easier, this got me confused as I have not seen many such tutorials using classes to scrape websites. Any guidance on using classes, not specific to web scraping but for writing good scalable and reusable code in python would greatly appreciated.

Author
User Disabled
Account Strength
0%
Disabled 4 months ago
Account Age
5 years
Verified Email
Yes
Verified Flair
No
Total Karma
6,531
Link Karma
663
Comment Karma
5,737
Profile updated: 4 days ago
Posts updated: 1 year ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
3 years ago