<jupyter_start><jupyter_text>Introduction **What?** Class definition and syntax  From 2.x to 3.x new class definition - Old class style are generally referred to as classical class. A classical class is any class that does not inherit form `object`. However, old classic class have been removed in python 3.x.- In short:    - **New-style classes** inherit from object, or from another new-style class.     - **Old-style classes** don't.<jupyter_code>class NewStyleClass(object):
    pass


class AnotherNewStyleClass(NewStyleClass):
    pass
class OldStyleClass:
    pass
dir(NewStyleClass)
dir(AnotherNewStyleClass)
dir(OldStyleClass)
print(type(NewStyleClass))
print(type(AnotherNewStyleClass))
print(type(OldStyleClass))<jupyter_output><class 'type'>
<class 'type'>
<class 'type'>
{'fraction_non_alphanumeric': 0.10089399744572158, 'fraction_numerical': 0.0038314176245210726, 'mean_word_length': 5.588235294117647, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '332509', 'license': 'OLDAP-2.3', 'n_tokens_mistral': 233, 'n_tokens_neox': 224, 'n_words': 79, 'path': 'Class definition and syntax.ipynb', 'repo_name': 'kyaiooiayk/Python-Programming', 'size': '783'}