[{"data":1,"prerenderedAt":8367},["ShallowReactive",2],{"tutorials-python":3,"category-items-python":987,"content-/python/method-overriding":988},[4,22,31,40,49,58,67,76,86,95,104,113,122,131,141,150,159,168,177,186,196,205,214,223,233,242,251,260,269,279,288,297,306,315,324,333,342,351,360,369,379,388,397,406,415,424,433,442,452,461,470,479,488,497,506,515,525,534,543,552,561,570,579,588,597,606,616,625,634,643,652,661,670,680,689,698,707,716,725,734,744,753,762,771,780,789,798,807,817,826,835,844,853,863,872,881,890,900,909,918,927,936,945,953,961,970,979],{"_path":5,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":9,"description":10,"slug":11,"order":12,"isParent":13,"icon":14,"_type":15,"_id":16,"_source":17,"_file":18,"_stem":19,"_extension":20,"children":21,"expanded":13},"/python/getting-started","python",false,"","Getting Started","Begin your Python programming journey. Learn what Python is, how to set it up, and write your first programs. Perfect for complete beginners starting their coding adventure.","getting-started",1,true,"pi pi-folder","markdown","content:python:1.getting-started.md","content","python/1.getting-started.md","python/1.getting-started","md",[22,31,40,49,58,67],{"_path":23,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":24,"description":25,"slug":26,"parentId":5,"order":27,"_type":15,"_id":28,"_source":17,"_file":29,"_stem":30,"_extension":20},"/python/what-is-python","What is Python","Discover Python's fascinating history, design philosophy, and key features. Learn why Python has become one of the world's most popular programming languages and perfect for beginners.","what-is-python",2,"content:python:2.what-is-python.md","python/2.what-is-python.md","python/2.what-is-python",{"_path":32,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":33,"description":34,"slug":35,"parentId":5,"order":36,"_type":15,"_id":37,"_source":17,"_file":38,"_stem":39,"_extension":20},"/python/setup-python","Setup Python","Learn how to install Python on your computer and set up your development environment. Step-by-step guide for Windows, macOS, and Linux with beginner-friendly instructions.","setup-python",3,"content:python:3.setup-python.md","python/3.setup-python.md","python/3.setup-python",{"_path":41,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":42,"description":43,"slug":44,"parentId":5,"order":45,"_type":15,"_id":46,"_source":17,"_file":47,"_stem":48,"_extension":20},"/python/your-first-program","Your First Program","Write and run your first Python program! Learn the basics of Python programming with simple examples and step-by-step instructions for beginners.","your-first-program",4,"content:python:4.your-first-program.md","python/4.your-first-program.md","python/4.your-first-program",{"_path":50,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":51,"description":52,"slug":53,"parentId":5,"order":54,"_type":15,"_id":55,"_source":17,"_file":56,"_stem":57,"_extension":20},"/python/python-code-structure","Python Code Structure","Learn how Python code is organized and structured. Understand indentation, line breaks, and the basic rules that make Python programs work correctly.","python-code-structure",5,"content:python:5.python-code-structure.md","python/5.python-code-structure.md","python/5.python-code-structure",{"_path":59,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":60,"description":61,"slug":62,"parentId":5,"order":63,"_type":15,"_id":64,"_source":17,"_file":65,"_stem":66,"_extension":20},"/python/writing-comments","Writing Comments","Learn how to write effective comments in Python. Discover when and how to document your code to make it clear, maintainable, and easy to understand.","writing-comments",6,"content:python:6.writing-comments.md","python/6.writing-comments.md","python/6.writing-comments",{"_path":68,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":69,"description":70,"slug":71,"parentId":5,"order":72,"_type":15,"_id":73,"_source":17,"_file":74,"_stem":75,"_extension":20},"/python/working-with-variables","Working with Variables","Learn how to create, use, and manage variables in Python. Understand how to store data, change values, and follow naming conventions for clean, readable code.","working-with-variables",7,"content:python:7.working-with-variables.md","python/7.working-with-variables.md","python/7.working-with-variables",{"_path":77,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":78,"description":79,"slug":80,"order":81,"isParent":13,"icon":14,"_type":15,"_id":82,"_source":17,"_file":83,"_stem":84,"_extension":20,"children":85,"expanded":13},"/python/basic-data-types","Basic Data Types","Learn about Python's fundamental data types including numbers, text, and boolean values","basic-data-types",8,"content:python:8.basic-data-types.md","python/8.basic-data-types.md","python/8.basic-data-types",[86,95,104,113,122],{"_path":87,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":88,"description":89,"slug":90,"parentId":77,"order":91,"_type":15,"_id":92,"_source":17,"_file":93,"_stem":94,"_extension":20},"/python/understanding-data-types","Understanding Data Types","Learn how Python identifies different data types and why they're important for programming","understanding-data-types",9,"content:python:9.understanding-data-types.md","python/9.understanding-data-types.md","python/9.understanding-data-types",{"_path":96,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":97,"description":98,"slug":99,"parentId":77,"order":100,"_type":15,"_id":101,"_source":17,"_file":102,"_stem":103,"_extension":20},"/python/working-with-numbers","Working with Numbers","Learn about Python's numeric data types including integers and floats, and how to perform calculations","working-with-numbers",10,"content:python:10.working-with-numbers.md","python/10.working-with-numbers.md","python/10.working-with-numbers",{"_path":105,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":106,"description":107,"slug":108,"parentId":77,"order":109,"_type":15,"_id":110,"_source":17,"_file":111,"_stem":112,"_extension":20},"/python/text-and-strings","Text and Strings","Learn how to work with text data in Python using strings, including creation, manipulation, and formatting","text-and-strings",11,"content:python:11.text-and-strings.md","python/11.text-and-strings.md","python/11.text-and-strings",{"_path":114,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":115,"description":116,"slug":117,"parentId":77,"order":118,"_type":15,"_id":119,"_source":17,"_file":120,"_stem":121,"_extension":20},"/python/true-false-values","True/False Values","Learn about boolean values in Python, including True/False logic, comparison operations, and how to use booleans for decision-making in your programs","true-false-values",12,"content:python:12.true-false-values.md","python/12.true-false-values.md","python/12.true-false-values",{"_path":123,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":124,"description":125,"slug":126,"parentId":77,"order":127,"_type":15,"_id":128,"_source":17,"_file":129,"_stem":130,"_extension":20},"/python/converting-types","Converting Types","Learn how to convert between different Python data types including strings, numbers, and booleans","converting-types",13,"content:python:13.converting-types.md","python/13.converting-types.md","python/13.converting-types",{"_path":132,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":133,"description":134,"slug":135,"order":136,"isParent":13,"icon":14,"_type":15,"_id":137,"_source":17,"_file":138,"_stem":139,"_extension":20,"children":140,"expanded":13},"/python/python-operators","Python Operators","Learn about Python operators - the symbols and keywords that perform operations on data. Discover arithmetic, comparison, logical, and assignment operators with simple examples.","python-operators",14,"content:python:14.python-operators.md","python/14.python-operators.md","python/14.python-operators",[141,150,159,168,177],{"_path":142,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":143,"description":144,"slug":145,"parentId":132,"order":146,"_type":15,"_id":147,"_source":17,"_file":148,"_stem":149,"_extension":20},"/python/math-operations","Math Operations","Learn Python's arithmetic operators for mathematical calculations. Master addition, subtraction, multiplication, division, and more with practical examples.","math-operations",15,"content:python:15.math-operations.md","python/15.math-operations.md","python/15.math-operations",{"_path":151,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":152,"description":153,"slug":154,"parentId":132,"order":155,"_type":15,"_id":156,"_source":17,"_file":157,"_stem":158,"_extension":20},"/python/comparing-values","Comparing Values","Learn Python's comparison operators to compare values and make decisions. Master equality, inequality, and relational operators with practical examples.","comparing-values",16,"content:python:16.comparing-values.md","python/16.comparing-values.md","python/16.comparing-values",{"_path":160,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":161,"description":162,"slug":163,"parentId":132,"order":164,"_type":15,"_id":165,"_source":17,"_file":166,"_stem":167,"_extension":20},"/python/logic-operations","Logic Operations","Learn about Python's logical operators for combining conditions and creating complex boolean expressions","logic-operations",17,"content:python:17.logic-operations.md","python/17.logic-operations.md","python/17.logic-operations",{"_path":169,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":170,"description":171,"slug":172,"parentId":132,"order":173,"_type":15,"_id":174,"_source":17,"_file":175,"_stem":176,"_extension":20},"/python/value-assignment","Value Assignment","Learn about Python's assignment operators for efficiently updating variables and performing calculations","value-assignment",18,"content:python:18.value-assignment.md","python/18.value-assignment.md","python/18.value-assignment",{"_path":178,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":179,"description":180,"slug":181,"parentId":132,"order":182,"_type":15,"_id":183,"_source":17,"_file":184,"_stem":185,"_extension":20},"/python/operator-precedence","Operator Precedence","Learn how Python evaluates expressions with multiple operators and how to control evaluation order","operator-precedence",19,"content:python:19.operator-precedence.md","python/19.operator-precedence.md","python/19.operator-precedence",{"_path":187,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":188,"description":189,"slug":190,"order":191,"isParent":13,"icon":14,"_type":15,"_id":192,"_source":17,"_file":193,"_stem":194,"_extension":20,"children":195,"expanded":13},"/python/decision-making","Decision Making","Learn how to make decisions in your Python programs using conditional statements and control flow","decision-making",20,"content:python:20.decision-making.md","python/20.decision-making.md","python/20.decision-making",[196,205,214],{"_path":197,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":198,"description":199,"slug":200,"parentId":187,"order":201,"_type":15,"_id":202,"_source":17,"_file":203,"_stem":204,"_extension":20},"/python/if-statements","If Statements","Learn how to use if statements to make decisions and control program flow in Python","if-statements",21,"content:python:21.if-statements.md","python/21.if-statements.md","python/21.if-statements",{"_path":206,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":207,"description":208,"slug":209,"parentId":187,"order":210,"_type":15,"_id":211,"_source":17,"_file":212,"_stem":213,"_extension":20},"/python/multiple-conditions","Multiple Conditions","Learn how to handle multiple conditions using elif statements and complex conditional logic in Python","multiple-conditions",22,"content:python:22.multiple-conditions.md","python/22.multiple-conditions.md","python/22.multiple-conditions",{"_path":215,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":216,"description":217,"slug":218,"parentId":187,"order":219,"_type":15,"_id":220,"_source":17,"_file":221,"_stem":222,"_extension":20},"/python/pattern-matching","Pattern Matching","Learn how to use Python's match-case statements for powerful pattern matching and complex decision making","pattern-matching",23,"content:python:23.pattern-matching.md","python/23.pattern-matching.md","python/23.pattern-matching",{"_path":224,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":225,"description":226,"slug":227,"order":228,"isParent":13,"icon":14,"_type":15,"_id":229,"_source":17,"_file":230,"_stem":231,"_extension":20,"children":232,"expanded":13},"/python/repetition-and-loops","Python Loops","Learn how to use loops to repeat code efficiently and handle repetitive tasks in Python","repetition-and-loops",24,"content:python:24.repetition-and-loops.md","python/24.repetition-and-loops.md","python/24.repetition-and-loops",[233,242,251,260],{"_path":234,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":235,"description":236,"slug":237,"parentId":224,"order":238,"_type":15,"_id":239,"_source":17,"_file":240,"_stem":241,"_extension":20},"/python/while-loops","While Loops","Learn how to use while loops for condition-based repetition and create loops that run until specific conditions are met","while-loops",25,"content:python:25.while-loops.md","python/25.while-loops.md","python/25.while-loops",{"_path":243,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":244,"description":245,"slug":246,"parentId":224,"order":247,"_type":15,"_id":248,"_source":17,"_file":249,"_stem":250,"_extension":20},"/python/for-loops","For Loops","Learn how to use for loops to iterate through sequences, collections, and ranges efficiently in Python","for-loops",26,"content:python:26.for-loops.md","python/26.for-loops.md","python/26.for-loops",{"_path":252,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":253,"description":254,"slug":255,"parentId":224,"order":256,"_type":15,"_id":257,"_source":17,"_file":258,"_stem":259,"_extension":20},"/python/loop-control","Loop Control","Master advanced loop control techniques including break, continue, and else clauses for sophisticated iteration patterns","loop-control",27,"content:python:27.loop-control.md","python/27.loop-control.md","python/27.loop-control",{"_path":261,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":262,"description":263,"slug":264,"parentId":224,"order":265,"_type":15,"_id":266,"_source":17,"_file":267,"_stem":268,"_extension":20},"/python/nested-loops","Nested Loops","Learn how to use nested loops to process multi-dimensional data, create patterns, and handle complex iteration scenarios","nested-loops",28,"content:python:28.nested-loops.md","python/28.nested-loops.md","python/28.nested-loops",{"_path":270,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":271,"description":272,"slug":273,"order":274,"isParent":13,"icon":14,"_type":15,"_id":275,"_source":17,"_file":276,"_stem":277,"_extension":20,"children":278,"expanded":13},"/python/python-lists","Python Lists","Learn about Python lists, one of the most important and versatile data structures for storing and organizing collections of data","python-lists",29,"content:python:29.python-lists.md","python/29.python-lists.md","python/29.python-lists",[279,288,297,306,315,324,333,342,351,360],{"_path":280,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":281,"description":282,"slug":283,"parentId":270,"order":284,"_type":15,"_id":285,"_source":17,"_file":286,"_stem":287,"_extension":20},"/python/creating-lists","Creating Lists","Learn different methods to create and initialize Python lists, from simple literals to advanced techniques","creating-lists",30,"content:python:30.creating-lists.md","python/30.creating-lists.md","python/30.creating-lists",{"_path":289,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":290,"description":291,"slug":292,"parentId":270,"order":293,"_type":15,"_id":294,"_source":17,"_file":295,"_stem":296,"_extension":20},"/python/reading-list-data","Reading List Data","Master techniques for accessing and retrieving data from Python lists using indexing, slicing, and built-in methods","reading-list-data",31,"content:python:31.reading-list-data.md","python/31.reading-list-data.md","python/31.reading-list-data",{"_path":298,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":299,"description":300,"slug":301,"parentId":270,"order":302,"_type":15,"_id":303,"_source":17,"_file":304,"_stem":305,"_extension":20},"/python/modifying-lists","Modifying Lists","Learn how to change, update, and modify existing elements in Python lists using indexing and various methods","modifying-lists",32,"content:python:32.modifying-lists.md","python/32.modifying-lists.md","python/32.modifying-lists",{"_path":307,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":308,"description":309,"slug":310,"parentId":270,"order":311,"_type":15,"_id":312,"_source":17,"_file":313,"_stem":314,"_extension":20},"/python/adding-to-lists","Adding to Lists","Learn various methods to add elements to Python lists including append, insert, extend, and concatenation techniques","adding-to-lists",33,"content:python:33.adding-to-lists.md","python/33.adding-to-lists.md","python/33.adding-to-lists",{"_path":316,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":317,"description":318,"slug":319,"parentId":270,"order":320,"_type":15,"_id":321,"_source":17,"_file":322,"_stem":323,"_extension":20},"/python/removing-from-lists","Removing from Lists","Learn different methods to remove and delete elements from Python lists including remove, pop, del, and clear","removing-from-lists",34,"content:python:34.removing-from-lists.md","python/34.removing-from-lists.md","python/34.removing-from-lists",{"_path":325,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":326,"description":327,"slug":328,"parentId":270,"order":329,"_type":15,"_id":330,"_source":17,"_file":331,"_stem":332,"_extension":20},"/python/looping-through-lists","Looping Through Lists","Learn different ways to iterate through Python lists using for loops, while loops, enumerate, and other iteration techniques","looping-through-lists",35,"content:python:35.looping-through-lists.md","python/35.looping-through-lists.md","python/35.looping-through-lists",{"_path":334,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":335,"description":336,"slug":337,"parentId":270,"order":338,"_type":15,"_id":339,"_source":17,"_file":340,"_stem":341,"_extension":20},"/python/list-shortcuts","List Shortcuts","Learn powerful Python list shortcuts including list comprehensions, slicing tricks, and built-in functions for efficient list operations","list-shortcuts",36,"content:python:36.list-shortcuts.md","python/36.list-shortcuts.md","python/36.list-shortcuts",{"_path":343,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":344,"description":345,"slug":346,"parentId":270,"order":347,"_type":15,"_id":348,"_source":17,"_file":349,"_stem":350,"_extension":20},"/python/organizing-lists","Organizing Lists","Learn how to sort, reverse, and organize Python lists using built-in methods and custom sorting techniques","organizing-lists",37,"content:python:37.organizing-lists.md","python/37.organizing-lists.md","python/37.organizing-lists",{"_path":352,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":353,"description":354,"slug":355,"parentId":270,"order":356,"_type":15,"_id":357,"_source":17,"_file":358,"_stem":359,"_extension":20},"/python/combining-lists","Combining Lists","Learn various techniques to combine, merge, and join Python lists including concatenation, zipping, and advanced merging strategies","combining-lists",38,"content:python:38.combining-lists.md","python/38.combining-lists.md","python/38.combining-lists",{"_path":361,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":362,"description":363,"slug":364,"parentId":270,"order":365,"_type":15,"_id":366,"_source":17,"_file":367,"_stem":368,"_extension":20},"/python/essential-list-tools","Essential List Tools","Master powerful built-in functions and advanced techniques for efficient Python list manipulation and data processing","essential-list-tools",39,"content:python:39.essential-list-tools.md","python/39.essential-list-tools.md","python/39.essential-list-tools",{"_path":370,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":371,"description":372,"slug":373,"order":374,"isParent":13,"icon":14,"_type":15,"_id":375,"_source":17,"_file":376,"_stem":377,"_extension":20,"children":378,"expanded":13},"/python/python-tuples","Python Tuples","Master Python tuples - immutable sequences perfect for storing related data that shouldn't change. Learn creation, access, and manipulation techniques.","python-tuples",40,"content:python:40.python-tuples.md","python/40.python-tuples.md","python/40.python-tuples",[379,388,397,406,415,424,433],{"_path":380,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":381,"description":382,"slug":383,"parentId":370,"order":384,"_type":15,"_id":385,"_source":17,"_file":386,"_stem":387,"_extension":20},"/python/creating-tuples","Creating Tuples","Learn different ways to create Python tuples, from basic syntax to advanced techniques. Master tuple initialization and understand when to use tuples.","creating-tuples",41,"content:python:41.creating-tuples.md","python/41.creating-tuples.md","python/41.creating-tuples",{"_path":389,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":390,"description":391,"slug":392,"parentId":370,"order":393,"_type":15,"_id":394,"_source":17,"_file":395,"_stem":396,"_extension":20},"/python/reading-tuple-data","Reading Tuple Data","Master accessing tuple elements through indexing, slicing, and searching. Learn efficient patterns for reading and working with tuple data.","reading-tuple-data",42,"content:python:42.reading-tuple-data.md","python/42.reading-tuple-data.md","python/42.reading-tuple-data",{"_path":398,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":399,"description":400,"slug":401,"parentId":370,"order":402,"_type":15,"_id":403,"_source":17,"_file":404,"_stem":405,"_extension":20},"/python/changing-tuples","Changing Tuples","Understand tuple immutability and learn techniques for working with unchangeable data. Master creating modified tuple versions and handling immutable constraints.","changing-tuples",43,"content:python:43.changing-tuples.md","python/43.changing-tuples.md","python/43.changing-tuples",{"_path":407,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":408,"description":409,"slug":410,"parentId":370,"order":411,"_type":15,"_id":412,"_source":17,"_file":413,"_stem":414,"_extension":20},"/python/tuple-unpacking","Tuple Unpacking","Master tuple unpacking for elegant variable assignment, function returns, and data extraction. Learn Python's powerful unpacking syntax and patterns.","tuple-unpacking",44,"content:python:44.tuple-unpacking.md","python/44.tuple-unpacking.md","python/44.tuple-unpacking",{"_path":416,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":417,"description":418,"slug":419,"parentId":370,"order":420,"_type":15,"_id":421,"_source":17,"_file":422,"_stem":423,"_extension":20},"/python/iterating-tuples","Iterating Tuples","Master tuple iteration techniques for processing sequence data. Learn basic loops, enumerate, nested iteration, and advanced patterns for efficient data processing.","iterating-tuples",45,"content:python:45.iterating-tuples.md","python/45.iterating-tuples.md","python/45.iterating-tuples",{"_path":425,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":426,"description":427,"slug":428,"parentId":370,"order":429,"_type":15,"_id":430,"_source":17,"_file":431,"_stem":432,"_extension":20},"/python/merging-tuples","Merging Tuples","Learn techniques for combining and merging tuples to create larger data structures. Master concatenation, joining multiple tuples, and advanced merging patterns.","merging-tuples",46,"content:python:46.merging-tuples.md","python/46.merging-tuples.md","python/46.merging-tuples",{"_path":434,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":435,"description":436,"slug":437,"parentId":370,"order":438,"_type":15,"_id":439,"_source":17,"_file":440,"_stem":441,"_extension":20},"/python/tuple-operations","Tuple Operations","Master comprehensive tuple operations including built-in functions, mathematical operations, comparisons, and advanced techniques for efficient tuple manipulation.","tuple-operations",47,"content:python:47.tuple-operations.md","python/47.tuple-operations.md","python/47.tuple-operations",{"_path":443,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":444,"description":445,"slug":446,"order":447,"isParent":13,"icon":14,"_type":15,"_id":448,"_source":17,"_file":449,"_stem":450,"_extension":20,"children":451,"expanded":13},"/python/python-sets","Python Sets","Discover Python sets - unique collections that automatically eliminate duplicates and provide powerful mathematical operations for data filtering and analysis.","python-sets",48,"content:python:48.python-sets.md","python/48.python-sets.md","python/48.python-sets",[452,461,470,479,488,497,506],{"_path":453,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":454,"description":455,"slug":456,"parentId":443,"order":457,"_type":15,"_id":458,"_source":17,"_file":459,"_stem":460,"_extension":20},"/python/creating-sets","Creating Sets","Learn multiple ways to create sets in Python including literal syntax, set() function, and set comprehensions. Master set creation from different data sources.","creating-sets",49,"content:python:49.creating-sets.md","python/49.creating-sets.md","python/49.creating-sets",{"_path":462,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":463,"description":464,"slug":465,"parentId":443,"order":466,"_type":15,"_id":467,"_source":17,"_file":468,"_stem":469,"_extension":20},"/python/reading-set-data","Reading Set Data","Learn how to access and examine set data in Python including membership testing, iteration, size checking, and converting sets to other data types.","reading-set-data",50,"content:python:50.reading-set-data.md","python/50.reading-set-data.md","python/50.reading-set-data",{"_path":471,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":472,"description":473,"slug":474,"parentId":443,"order":475,"_type":15,"_id":476,"_source":17,"_file":477,"_stem":478,"_extension":20},"/python/adding-to-sets","Adding to Sets","Learn how to add elements to sets in Python using add(), update(), and union operations. Master growing sets dynamically with single items and multiple elements.","adding-to-sets",51,"content:python:51.adding-to-sets.md","python/51.adding-to-sets.md","python/51.adding-to-sets",{"_path":480,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":481,"description":482,"slug":483,"parentId":443,"order":484,"_type":15,"_id":485,"_source":17,"_file":486,"_stem":487,"_extension":20},"/python/removing-from-sets","Removing from Sets","Learn how to remove elements from Python sets using different methods like remove(), discard(), pop(), and clear()","removing-from-sets",52,"content:python:52.removing-from-sets.md","python/52.removing-from-sets.md","python/52.removing-from-sets",{"_path":489,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":490,"description":491,"slug":492,"parentId":443,"order":493,"_type":15,"_id":494,"_source":17,"_file":495,"_stem":496,"_extension":20},"/python/iterating-sets","Iterating Sets","Learn different ways to iterate through Python sets using for loops, comprehensions, and built-in functions","iterating-sets",53,"content:python:53.iterating-sets.md","python/53.iterating-sets.md","python/53.iterating-sets",{"_path":498,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":499,"description":500,"slug":501,"parentId":443,"order":502,"_type":15,"_id":503,"_source":17,"_file":504,"_stem":505,"_extension":20},"/python/combining-sets","Combining Sets","Learn how to combine Python sets using union, intersection, difference, and other set operations","combining-sets",54,"content:python:54.combining-sets.md","python/54.combining-sets.md","python/54.combining-sets",{"_path":507,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":508,"description":509,"slug":510,"parentId":443,"order":511,"_type":15,"_id":512,"_source":17,"_file":513,"_stem":514,"_extension":20},"/python/set-operations","Set Operations","Learn advanced Python set operations including comparisons, subsets, supersets, and mathematical set relationships","set-operations",55,"content:python:55.set-operations.md","python/55.set-operations.md","python/55.set-operations",{"_path":516,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":517,"description":518,"slug":519,"order":520,"isParent":13,"icon":14,"_type":15,"_id":521,"_source":17,"_file":522,"_stem":523,"_extension":20,"children":524,"expanded":13},"/python/python-dictionaries","Python Dictionaries","Learn about Python dictionaries - key-value data structures for storing and organizing related information","python-dictionaries",56,"content:python:56.python-dictionaries.md","python/56.python-dictionaries.md","python/56.python-dictionaries",[525,534,543,552,561,570,579,588,597],{"_path":526,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":527,"description":528,"slug":529,"parentId":516,"order":530,"_type":15,"_id":531,"_source":17,"_file":532,"_stem":533,"_extension":20},"/python/creating-dictionaries","Creating Dictionaries","Learn different methods to create Python dictionaries using literals, constructors, and comprehensions","creating-dictionaries",57,"content:python:57.creating-dictionaries.md","python/57.creating-dictionaries.md","python/57.creating-dictionaries",{"_path":535,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":536,"description":537,"slug":538,"parentId":516,"order":539,"_type":15,"_id":540,"_source":17,"_file":541,"_stem":542,"_extension":20},"/python/getting-dictionary-values","Getting Dictionary Values","Learn safe and efficient methods to retrieve data from Python dictionaries using various access techniques","getting-dictionary-values",58,"content:python:58.getting-dictionary-values.md","python/58.getting-dictionary-values.md","python/58.getting-dictionary-values",{"_path":544,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":545,"description":546,"slug":547,"parentId":516,"order":548,"_type":15,"_id":549,"_source":17,"_file":550,"_stem":551,"_extension":20},"/python/updating-dictionaries","Updating Dictionaries","Learn how to modify and maintain Python dictionary data using various update methods and techniques","updating-dictionaries",59,"content:python:59.updating-dictionaries.md","python/59.updating-dictionaries.md","python/59.updating-dictionaries",{"_path":553,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":554,"description":555,"slug":556,"parentId":516,"order":557,"_type":15,"_id":558,"_source":17,"_file":559,"_stem":560,"_extension":20},"/python/adding-dictionary-items","Adding Dictionary Items","Learn effective techniques for adding new items to Python dictionaries with various methods and best practices","adding-dictionary-items",60,"content:python:60.adding-dictionary-items.md","python/60.adding-dictionary-items.md","python/60.adding-dictionary-items",{"_path":562,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":563,"description":564,"slug":565,"parentId":516,"order":566,"_type":15,"_id":567,"_source":17,"_file":568,"_stem":569,"_extension":20},"/python/deleting-dictionary-items","Deleting Dictionary Items","Master safe and efficient techniques for removing items from Python dictionaries with various methods and error handling","deleting-dictionary-items",61,"content:python:61.deleting-dictionary-items.md","python/61.deleting-dictionary-items.md","python/61.deleting-dictionary-items",{"_path":571,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":572,"description":573,"slug":574,"parentId":516,"order":575,"_type":15,"_id":576,"_source":17,"_file":577,"_stem":578,"_extension":20},"/python/looping-dictionaries","Looping Dictionaries","Learn efficient techniques for iterating through Python dictionaries using keys, values, and items","looping-dictionaries",62,"content:python:62.looping-dictionaries.md","python/62.looping-dictionaries.md","python/62.looping-dictionaries",{"_path":580,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":581,"description":582,"slug":583,"parentId":516,"order":584,"_type":15,"_id":585,"_source":17,"_file":586,"_stem":587,"_extension":20},"/python/dictionary-copies","Dictionary Copies","Learn safe techniques for duplicating Python dictionaries using shallow and deep copy methods","dictionary-copies",63,"content:python:63.dictionary-copies.md","python/63.dictionary-copies.md","python/63.dictionary-copies",{"_path":589,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":590,"description":591,"slug":592,"parentId":516,"order":593,"_type":15,"_id":594,"_source":17,"_file":595,"_stem":596,"_extension":20},"/python/multi-level-dictionaries","Multi-level Dictionaries","Master working with nested Python dictionaries for complex data structures and hierarchical information","multi-level-dictionaries",64,"content:python:64.multi-level-dictionaries.md","python/64.multi-level-dictionaries.md","python/64.multi-level-dictionaries",{"_path":598,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":599,"description":600,"slug":601,"parentId":516,"order":602,"_type":15,"_id":603,"_source":17,"_file":604,"_stem":605,"_extension":20},"/python/dictionary-tools","Dictionary Tools","Explore powerful built-in functions and advanced techniques for efficient Python dictionary manipulation and analysis","dictionary-tools",65,"content:python:65.dictionary-tools.md","python/65.dictionary-tools.md","python/65.dictionary-tools",{"_path":607,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":608,"description":609,"slug":610,"order":611,"isParent":13,"icon":14,"_type":15,"_id":612,"_source":17,"_file":613,"_stem":614,"_extension":20,"children":615,"expanded":13},"/python/python-functions","Python Functions","Learn how to create and use Python functions to organize code into reusable, modular components that make programs more efficient and maintainable","python-functions",66,"content:python:66.python-functions.md","python/66.python-functions.md","python/66.python-functions",[616,625,634,643,652,661],{"_path":617,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":618,"description":619,"slug":620,"parentId":607,"order":621,"_type":15,"_id":622,"_source":17,"_file":623,"_stem":624,"_extension":20},"/python/function-basics","Function Basics","Learn the fundamentals of creating and using Python functions to organize code into reusable, modular components","function-basics",67,"content:python:67.function-basics.md","python/67.function-basics.md","python/67.function-basics",{"_path":626,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":627,"description":628,"slug":629,"parentId":607,"order":630,"_type":15,"_id":631,"_source":17,"_file":632,"_stem":633,"_extension":20},"/python/function-parameters","Function Parameters","Master different types of Python function parameters including positional, keyword, default, and variable-length arguments","function-parameters",68,"content:python:68.function-parameters.md","python/68.function-parameters.md","python/68.function-parameters",{"_path":635,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":636,"description":637,"slug":638,"parentId":607,"order":639,"_type":15,"_id":640,"_source":17,"_file":641,"_stem":642,"_extension":20},"/python/returning-values","Returning Values","Learn different ways Python functions return data including single values, multiple values, and conditional returns","returning-values",69,"content:python:69.returning-values.md","python/69.returning-values.md","python/69.returning-values",{"_path":644,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":645,"description":646,"slug":647,"parentId":607,"order":648,"_type":15,"_id":649,"_source":17,"_file":650,"_stem":651,"_extension":20},"/python/variable-scope","Variable Scope","Understand Python variable scope including local, global, and nonlocal variables and how they affect function behavior","variable-scope",70,"content:python:70.variable-scope.md","python/70.variable-scope.md","python/70.variable-scope",{"_path":653,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":654,"description":655,"slug":656,"parentId":607,"order":657,"_type":15,"_id":658,"_source":17,"_file":659,"_stem":660,"_extension":20},"/python/anonymous-functions","Anonymous Functions","Learn to create and use Python lambda functions for concise, inline function definitions and functional programming patterns","anonymous-functions",71,"content:python:71.anonymous-functions.md","python/71.anonymous-functions.md","python/71.anonymous-functions",{"_path":662,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":663,"description":664,"slug":665,"parentId":607,"order":666,"_type":15,"_id":667,"_source":17,"_file":668,"_stem":669,"_extension":20},"/python/function-recursion","Function Recursion","Master recursive functions in Python by learning how functions can call themselves to solve complex problems with elegant, mathematical solutions","function-recursion",72,"content:python:72.function-recursion.md","python/72.function-recursion.md","python/72.function-recursion",{"_path":671,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":672,"description":673,"slug":674,"order":675,"isParent":13,"icon":14,"_type":15,"_id":676,"_source":17,"_file":677,"_stem":678,"_extension":20,"children":679,"expanded":13},"/python/object-programming","Object Programming","Learn object-oriented programming (OOP) in Python - create classes, objects, and methods to build organized, reusable code","object-programming",73,"content:python:73.object-programming.md","python/73.object-programming.md","python/73.object-programming",[680,689,698,707,716,725],{"_path":681,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":682,"description":683,"slug":684,"parentId":671,"order":685,"_type":15,"_id":686,"_source":17,"_file":687,"_stem":688,"_extension":20},"/python/classes-and-objects","Classes and Objects","Learn to create Python classes and objects - the foundation of object-oriented programming for building reusable, organized code","classes-and-objects",74,"content:python:74.classes-and-objects.md","python/74.classes-and-objects.md","python/74.classes-and-objects",{"_path":690,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":691,"description":692,"slug":693,"parentId":671,"order":694,"_type":15,"_id":695,"_source":17,"_file":696,"_stem":697,"_extension":20},"/python/object-methods","Object Methods","Master object methods in Python - learn to define behaviors, work with parameters, and create interactive objects that respond to actions","object-methods",75,"content:python:75.object-methods.md","python/75.object-methods.md","python/75.object-methods",{"_path":699,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":700,"description":701,"slug":702,"parentId":671,"order":703,"_type":15,"_id":704,"_source":17,"_file":705,"_stem":706,"_extension":20},"/python/class-inheritance","Class Inheritance","Learn Python class inheritance - create specialized classes that build upon existing functionality while adding new features and behaviors","class-inheritance",76,"content:python:76.class-inheritance.md","python/76.class-inheritance.md","python/76.class-inheritance",{"_path":708,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":709,"description":710,"slug":711,"parentId":671,"order":712,"_type":15,"_id":713,"_source":17,"_file":714,"_stem":715,"_extension":20},"/python/method-overriding","Method Overriding","Master method overriding in Python - learn to customize inherited methods, use super(), and create specialized behaviors while maintaining inheritance benefits","method-overriding",77,"content:python:77.method-overriding.md","python/77.method-overriding.md","python/77.method-overriding",{"_path":717,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":718,"description":719,"slug":720,"parentId":671,"order":721,"_type":15,"_id":722,"_source":17,"_file":723,"_stem":724,"_extension":20},"/python/variable-visibility","Variable Visibility","Master Python variable visibility - learn public, protected, and private attributes to control access and create well-encapsulated classes","variable-visibility",78,"content:python:78.variable-visibility.md","python/78.variable-visibility.md","python/78.variable-visibility",{"_path":726,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":727,"description":728,"slug":729,"parentId":671,"order":730,"_type":15,"_id":731,"_source":17,"_file":732,"_stem":733,"_extension":20},"/python/special-methods","Special Methods","Master Python special methods (magic methods) - learn to implement __str__, __len__, __eq__ and more to make your classes work seamlessly with Python's built-in functions","special-methods",79,"content:python:79.special-methods.md","python/79.special-methods.md","python/79.special-methods",{"_path":735,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":736,"description":737,"slug":738,"order":739,"isParent":13,"icon":14,"_type":15,"_id":740,"_source":17,"_file":741,"_stem":742,"_extension":20,"children":743},"/python/advanced-concepts","Advanced Concepts","Master advanced Python programming concepts - work with dates, mathematics, JSON data, pattern matching, and more sophisticated programming techniques","advanced-concepts",80,"content:python:80.advanced-concepts.md","python/80.advanced-concepts.md","python/80.advanced-concepts",[744,753,762,771,780,789,798],{"_path":745,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":746,"description":747,"slug":748,"parentId":735,"order":749,"_type":15,"_id":750,"_source":17,"_file":751,"_stem":752,"_extension":20},"/python/working-with-dates","Working with Dates","Master Python date and time handling - work with datetime objects, format dates, calculate durations, and build time-aware applications","working-with-dates",81,"content:python:81.working-with-dates.md","python/81.working-with-dates.md","python/81.working-with-dates",{"_path":754,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":755,"description":756,"slug":757,"parentId":735,"order":758,"_type":15,"_id":759,"_source":17,"_file":760,"_stem":761,"_extension":20},"/python/mathematical-operations","Mathematical Operations","Master Python mathematical computing - use math functions, perform statistical calculations, and implement scientific computing for data analysis and problem-solving","mathematical-operations",82,"content:python:82.mathematical-operations.md","python/82.mathematical-operations.md","python/82.mathematical-operations",{"_path":763,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":764,"description":765,"slug":766,"parentId":735,"order":767,"_type":15,"_id":768,"_source":17,"_file":769,"_stem":770,"_extension":20},"/python/json-data","JSON Data","Master JSON data handling in Python - serialize and deserialize data, work with APIs, manage configuration files, and exchange data between applications","json-data",83,"content:python:83.json-data.md","python/83.json-data.md","python/83.json-data",{"_path":772,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":773,"description":774,"slug":775,"parentId":735,"order":776,"_type":15,"_id":777,"_source":17,"_file":778,"_stem":779,"_extension":20},"/python/package-management","Package Management","Master Python package management with pip and virtual environments - install libraries, manage dependencies, create isolated environments, and distribute packages professionally","package-management",85,"content:python:85.package-management.md","python/85.package-management.md","python/85.package-management",{"_path":781,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":782,"description":783,"slug":784,"parentId":735,"order":785,"_type":15,"_id":786,"_source":17,"_file":787,"_stem":788,"_extension":20},"/python/error-handling","Error Handling","Master Python error handling with try/except blocks, exception types, custom exceptions, debugging techniques, and best practices for robust application development","error-handling",86,"content:python:86.error-handling.md","python/86.error-handling.md","python/86.error-handling",{"_path":790,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":791,"description":792,"slug":793,"parentId":735,"order":794,"_type":15,"_id":795,"_source":17,"_file":796,"_stem":797,"_extension":20},"/python/getting-user-input","Getting User Input","Master user input handling in Python with input validation, data type conversion, interactive programs, and command-line interfaces for engaging user experiences","getting-user-input",87,"content:python:87.getting-user-input.md","python/87.getting-user-input.md","python/87.getting-user-input",{"_path":799,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":800,"description":801,"slug":802,"parentId":735,"order":803,"_type":15,"_id":804,"_source":17,"_file":805,"_stem":806,"_extension":20},"/python/text-formatting","Text Formatting","Master Python text formatting with f-strings, format methods, alignment, number formatting, and advanced techniques for professional, readable output","text-formatting",88,"content:python:88.text-formatting.md","python/88.text-formatting.md","python/88.text-formatting",{"_path":808,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":809,"description":810,"slug":811,"order":812,"isParent":13,"icon":14,"_type":15,"_id":813,"_source":17,"_file":814,"_stem":815,"_extension":20,"children":816},"/python/file-operations","File Operations","Master Python file handling with reading, writing, and managing files for data persistence and real-world applications","file-operations",89,"content:python:89.file-operations.md","python/89.file-operations.md","python/89.file-operations",[817,826,835,844],{"_path":818,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":819,"description":820,"slug":821,"parentId":808,"order":822,"_type":15,"_id":823,"_source":17,"_file":824,"_stem":825,"_extension":20},"/python/file-basics","File Basics","Learn fundamental Python file operations including opening files, understanding file modes, using context managers, and basic file handling concepts","file-basics",90,"content:python:90.file-basics.md","python/90.file-basics.md","python/90.file-basics",{"_path":827,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":828,"description":829,"slug":830,"parentId":808,"order":831,"_type":15,"_id":832,"_source":17,"_file":833,"_stem":834,"_extension":20},"/python/reading-files","Reading Files","Master Python file reading techniques including reading entire files, line-by-line processing, and handling different file formats for efficient data processing","reading-files",91,"content:python:91.reading-files.md","python/91.reading-files.md","python/91.reading-files",{"_path":836,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":837,"description":838,"slug":839,"parentId":808,"order":840,"_type":15,"_id":841,"_source":17,"_file":842,"_stem":843,"_extension":20},"/python/writing-files","Writing Files","Learn Python file writing techniques including creating new files, appending content, updating existing files, and saving different data formats safely","writing-files",92,"content:python:92.writing-files.md","python/92.writing-files.md","python/92.writing-files",{"_path":845,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":846,"description":847,"slug":848,"parentId":808,"order":849,"_type":15,"_id":850,"_source":17,"_file":851,"_stem":852,"_extension":20},"/python/file-management","File Management","Learn Python file management techniques including checking file properties, organizing files, directory operations, and implementing file system maintenance tasks","file-management",93,"content:python:93.file-management.md","python/93.file-management.md","python/93.file-management",{"_path":854,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":855,"description":856,"slug":857,"order":858,"isParent":13,"icon":14,"_type":15,"_id":859,"_source":17,"_file":860,"_stem":861,"_extension":20,"children":862},"/python/code-organization","Code Organization","Master Python code organization with modules, built-in libraries, and path management for creating maintainable and reusable applications","code-organization",94,"content:python:94.code-organization.md","python/94.code-organization.md","python/94.code-organization",[863,872,881],{"_path":864,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":865,"description":866,"slug":867,"parentId":854,"order":868,"_type":15,"_id":869,"_source":17,"_file":870,"_stem":871,"_extension":20},"/python/creating-modules","Creating Modules","Learn how to create custom Python modules, organize functions and classes, write reusable code components, and design effective module structures","creating-modules",95,"content:python:95.creating-modules.md","python/95.creating-modules.md","python/95.creating-modules",{"_path":873,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":874,"description":875,"slug":876,"parentId":854,"order":877,"_type":15,"_id":878,"_source":17,"_file":879,"_stem":880,"_extension":20},"/python/using-built-in-modules","Using Built-in Modules","Discover Python's extensive standard library and learn to effectively use built-in modules for common programming tasks, data processing, and system operations","using-built-in-modules",96,"content:python:96.using-built-in-modules.md","python/96.using-built-in-modules.md","python/96.using-built-in-modules",{"_path":882,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":883,"description":884,"slug":885,"parentId":854,"order":886,"_type":15,"_id":887,"_source":17,"_file":888,"_stem":889,"_extension":20},"/python/module-paths","Module Paths","Understand Python's module search system, manage import paths, work with packages, and organize larger projects with proper module path management","module-paths",97,"content:python:97.module-paths.md","python/97.module-paths.md","python/97.module-paths",{"_path":891,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":892,"description":893,"slug":894,"order":895,"isParent":13,"icon":14,"_type":15,"_id":896,"_source":17,"_file":897,"_stem":898,"_extension":20,"children":899,"expanded":13},"/python/reference-materials","Reference Materials","Comprehensive Python reference materials including reserved words, built-in functions, and operation guides for quick lookup and development support","reference-materials",98,"content:python:98.reference-materials.md","python/98.reference-materials.md","python/98.reference-materials",[900,909,918,927,936,945,953,961,970],{"_path":901,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":902,"description":903,"slug":904,"parentId":891,"order":905,"_type":15,"_id":906,"_source":17,"_file":907,"_stem":908,"_extension":20},"/python/reserved-words","Reserved Words","Complete reference of Python keywords and reserved words with descriptions, usage examples, and syntax guidelines","reserved-words",99,"content:python:99.reserved-words.md","python/99.reserved-words.md","python/99.reserved-words",{"_path":910,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":911,"description":912,"slug":913,"parentId":891,"order":914,"_type":15,"_id":915,"_source":17,"_file":916,"_stem":917,"_extension":20},"/python/built-in-functions","Built-in Functions","Comprehensive reference of Python's built-in functions with parameters, return values, and practical usage examples","built-in-functions",100,"content:python:100.built-in-functions.md","python/100.built-in-functions.md","python/100.built-in-functions",{"_path":919,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":920,"description":921,"slug":922,"parentId":891,"order":923,"_type":15,"_id":924,"_source":17,"_file":925,"_stem":926,"_extension":20},"/python/string-operations","String Operations","Complete reference of Python string methods, operations, and formatting techniques with examples and use cases","string-operations",101,"content:python:101.string-operations.md","python/101.string-operations.md","python/101.string-operations",{"_path":928,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":929,"description":930,"slug":931,"parentId":891,"order":932,"_type":15,"_id":933,"_source":17,"_file":934,"_stem":935,"_extension":20},"/python/list-operations","List Operations","Complete reference of Python list methods, operations, and manipulation techniques with examples and performance notes","list-operations",102,"content:python:102.list-operations.md","python/102.list-operations.md","python/102.list-operations",{"_path":937,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":938,"description":939,"slug":940,"parentId":891,"order":941,"_type":15,"_id":942,"_source":17,"_file":943,"_stem":944,"_extension":20},"/python/dictionary-operations","Dictionary Operations","Complete reference of Python dictionary methods, operations, and manipulation techniques with examples and use cases","dictionary-operations",103,"content:python:103.dictionary-operations.md","python/103.dictionary-operations.md","python/103.dictionary-operations",{"_path":946,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":435,"description":947,"slug":948,"parentId":891,"order":949,"_type":15,"_id":950,"_source":17,"_file":951,"_stem":952,"_extension":20},"/python/tuple-methods","Complete reference of Python tuple operations, methods, and techniques with examples and use cases","tuple-methods",104,"content:python:104.tuple-methods.md","python/104.tuple-methods.md","python/104.tuple-methods",{"_path":954,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":508,"description":955,"slug":956,"parentId":891,"order":957,"_type":15,"_id":958,"_source":17,"_file":959,"_stem":960,"_extension":20},"/python/set-methods","Complete reference of Python set operations, methods, and mathematical set operations with examples and use cases","set-methods",105,"content:python:105.set-methods.md","python/105.set-methods.md","python/105.set-methods",{"_path":962,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":963,"description":964,"slug":965,"parentId":891,"order":966,"_type":15,"_id":967,"_source":17,"_file":968,"_stem":969,"_extension":20},"/python/file-operations-reference","File Operations Reference","Complete reference of Python file operations, modes, methods, and file handling techniques with examples","file-operations-reference",106,"content:python:106.file-operations-reference.md","python/106.file-operations-reference.md","python/106.file-operations-reference",{"_path":971,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":972,"description":973,"slug":974,"parentId":891,"order":975,"_type":15,"_id":976,"_source":17,"_file":977,"_stem":978,"_extension":20},"/python/error-types","Error Types","Complete reference of Python exception types, error handling patterns, and debugging techniques with examples","error-types",107,"content:python:107.error-types.md","python/107.error-types.md","python/107.error-types",{"_path":980,"_dir":8,"_draft":7,"_partial":7,"_locale":8,"title":981,"description":10,"slug":982,"order":983,"icon":14,"_type":15,"_id":984,"_source":17,"_file":985,"_stem":986,"_extension":20},"/python","Introduction","python-tutorial",0,"content:python:index.md","python/index.md","python/index",[707],{"_path":708,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":709,"description":710,"slug":711,"parentId":671,"order":712,"body":989,"_type":15,"_id":713,"_source":17,"_file":714,"_stem":715,"_extension":20},{"type":990,"children":991,"toc":8348},"root",[992,1000,1006,1011,1706,1713,1718,1836,1843,1848,2393,2399,2404,3178,3184,3197,3203,3215,4016,4022,4027,5014,5020,5025,5031,5036,5745,5751,5757,5762,6787,6886,6891,7495,7501,8289,8302,8308,8313,8320,8326,8331,8342],{"type":993,"tag":994,"props":995,"children":996},"element","h1",{"id":711},[997],{"type":998,"value":999},"text","🔄 Method Overriding",{"type":993,"tag":1001,"props":1002,"children":1003},"p",{},[1004],{"type":998,"value":1005},"Method overriding allows child classes to provide specialized implementations of methods inherited from parent classes. This powerful feature enables you to customize behavior while maintaining the same interface, creating flexible hierarchies where each class can have its own version of common operations.",{"type":993,"tag":1001,"props":1007,"children":1008},{},[1009],{"type":998,"value":1010},"Think of method overriding like customizing a family recipe - you inherit the basic recipe from your parent, but you can modify ingredients or techniques to create your own signature version while keeping the same dish name.",{"type":993,"tag":1012,"props":1013,"children":1014},"code-try",{},[1015],{"type":993,"tag":1016,"props":1017,"children":1020},"pre",{"className":1018,"code":1019,"language":6,"meta":8,"style":8},"language-python shiki shiki-themes github-light github-dark","# Method overriding in action\nclass Payment:\n    def __init__(self, amount):\n        self.amount = amount\n    \n    def process(self):\n        return f\"Processing ${self.amount} payment\"\n    \n    def get_fee(self):\n        return self.amount * 0.03  # 3% default fee\n\nclass CreditCard(Payment):\n    def process(self):  # Override process method\n        return f\"Processing ${self.amount} via credit card\"\n    \n    def get_fee(self):  # Override fee calculation\n        return self.amount * 0.025  # 2.5% for credit cards\n\nclass PayPal(Payment):\n    def process(self):  # Override process method\n        return f\"Processing ${self.amount} via PayPal\"\n    \n    def get_fee(self):  # Override fee calculation\n        return self.amount * 0.035 + 0.30  # 3.5% + $0.30\n\n# Each payment type processes differently\ncredit = CreditCard(100)\npaypal = PayPal(100)\n\nprint(credit.process())  # Credit card version\nprint(f\"Fee: ${credit.get_fee()}\")\nprint(paypal.process())  # PayPal version\nprint(f\"Fee: ${paypal.get_fee():.2f}\")\n",[1021],{"type":993,"tag":1022,"props":1023,"children":1024},"code",{"__ignoreMap":8},[1025,1036,1057,1076,1099,1107,1124,1163,1170,1186,1217,1225,1252,1273,1305,1312,1332,1361,1368,1392,1411,1443,1450,1469,1508,1515,1523,1550,1575,1582,1600,1644,1661],{"type":993,"tag":1026,"props":1027,"children":1029},"span",{"class":1028,"line":12},"line",[1030],{"type":993,"tag":1026,"props":1031,"children":1033},{"style":1032},"--shiki-default:#6A737D;--shiki-app-dark-mode:#6A737D",[1034],{"type":998,"value":1035},"# Method overriding in action\n",{"type":993,"tag":1026,"props":1037,"children":1038},{"class":1028,"line":27},[1039,1045,1051],{"type":993,"tag":1026,"props":1040,"children":1042},{"style":1041},"--shiki-default:#D73A49;--shiki-app-dark-mode:#F97583",[1043],{"type":998,"value":1044},"class",{"type":993,"tag":1026,"props":1046,"children":1048},{"style":1047},"--shiki-default:#6F42C1;--shiki-app-dark-mode:#B392F0",[1049],{"type":998,"value":1050}," Payment",{"type":993,"tag":1026,"props":1052,"children":1054},{"style":1053},"--shiki-default:#24292E;--shiki-app-dark-mode:#E1E4E8",[1055],{"type":998,"value":1056},":\n",{"type":993,"tag":1026,"props":1058,"children":1059},{"class":1028,"line":36},[1060,1065,1071],{"type":993,"tag":1026,"props":1061,"children":1062},{"style":1041},[1063],{"type":998,"value":1064},"    def",{"type":993,"tag":1026,"props":1066,"children":1068},{"style":1067},"--shiki-default:#005CC5;--shiki-app-dark-mode:#79B8FF",[1069],{"type":998,"value":1070}," __init__",{"type":993,"tag":1026,"props":1072,"children":1073},{"style":1053},[1074],{"type":998,"value":1075},"(self, amount):\n",{"type":993,"tag":1026,"props":1077,"children":1078},{"class":1028,"line":45},[1079,1084,1089,1094],{"type":993,"tag":1026,"props":1080,"children":1081},{"style":1067},[1082],{"type":998,"value":1083},"        self",{"type":993,"tag":1026,"props":1085,"children":1086},{"style":1053},[1087],{"type":998,"value":1088},".amount ",{"type":993,"tag":1026,"props":1090,"children":1091},{"style":1041},[1092],{"type":998,"value":1093},"=",{"type":993,"tag":1026,"props":1095,"children":1096},{"style":1053},[1097],{"type":998,"value":1098}," amount\n",{"type":993,"tag":1026,"props":1100,"children":1101},{"class":1028,"line":54},[1102],{"type":993,"tag":1026,"props":1103,"children":1104},{"style":1053},[1105],{"type":998,"value":1106},"    \n",{"type":993,"tag":1026,"props":1108,"children":1109},{"class":1028,"line":63},[1110,1114,1119],{"type":993,"tag":1026,"props":1111,"children":1112},{"style":1041},[1113],{"type":998,"value":1064},{"type":993,"tag":1026,"props":1115,"children":1116},{"style":1047},[1117],{"type":998,"value":1118}," process",{"type":993,"tag":1026,"props":1120,"children":1121},{"style":1053},[1122],{"type":998,"value":1123},"(self):\n",{"type":993,"tag":1026,"props":1125,"children":1126},{"class":1028,"line":72},[1127,1132,1137,1143,1148,1153,1158],{"type":993,"tag":1026,"props":1128,"children":1129},{"style":1041},[1130],{"type":998,"value":1131},"        return",{"type":993,"tag":1026,"props":1133,"children":1134},{"style":1041},[1135],{"type":998,"value":1136}," f",{"type":993,"tag":1026,"props":1138,"children":1140},{"style":1139},"--shiki-default:#032F62;--shiki-app-dark-mode:#9ECBFF",[1141],{"type":998,"value":1142},"\"Processing $",{"type":993,"tag":1026,"props":1144,"children":1145},{"style":1067},[1146],{"type":998,"value":1147},"{self",{"type":993,"tag":1026,"props":1149,"children":1150},{"style":1053},[1151],{"type":998,"value":1152},".amount",{"type":993,"tag":1026,"props":1154,"children":1155},{"style":1067},[1156],{"type":998,"value":1157},"}",{"type":993,"tag":1026,"props":1159,"children":1160},{"style":1139},[1161],{"type":998,"value":1162}," payment\"\n",{"type":993,"tag":1026,"props":1164,"children":1165},{"class":1028,"line":81},[1166],{"type":993,"tag":1026,"props":1167,"children":1168},{"style":1053},[1169],{"type":998,"value":1106},{"type":993,"tag":1026,"props":1171,"children":1172},{"class":1028,"line":91},[1173,1177,1182],{"type":993,"tag":1026,"props":1174,"children":1175},{"style":1041},[1176],{"type":998,"value":1064},{"type":993,"tag":1026,"props":1178,"children":1179},{"style":1047},[1180],{"type":998,"value":1181}," get_fee",{"type":993,"tag":1026,"props":1183,"children":1184},{"style":1053},[1185],{"type":998,"value":1123},{"type":993,"tag":1026,"props":1187,"children":1188},{"class":1028,"line":100},[1189,1193,1198,1202,1207,1212],{"type":993,"tag":1026,"props":1190,"children":1191},{"style":1041},[1192],{"type":998,"value":1131},{"type":993,"tag":1026,"props":1194,"children":1195},{"style":1067},[1196],{"type":998,"value":1197}," self",{"type":993,"tag":1026,"props":1199,"children":1200},{"style":1053},[1201],{"type":998,"value":1088},{"type":993,"tag":1026,"props":1203,"children":1204},{"style":1041},[1205],{"type":998,"value":1206},"*",{"type":993,"tag":1026,"props":1208,"children":1209},{"style":1067},[1210],{"type":998,"value":1211}," 0.03",{"type":993,"tag":1026,"props":1213,"children":1214},{"style":1032},[1215],{"type":998,"value":1216},"  # 3% default fee\n",{"type":993,"tag":1026,"props":1218,"children":1219},{"class":1028,"line":109},[1220],{"type":993,"tag":1026,"props":1221,"children":1222},{"emptyLinePlaceholder":13},[1223],{"type":998,"value":1224},"\n",{"type":993,"tag":1026,"props":1226,"children":1227},{"class":1028,"line":118},[1228,1232,1237,1242,1247],{"type":993,"tag":1026,"props":1229,"children":1230},{"style":1041},[1231],{"type":998,"value":1044},{"type":993,"tag":1026,"props":1233,"children":1234},{"style":1047},[1235],{"type":998,"value":1236}," CreditCard",{"type":993,"tag":1026,"props":1238,"children":1239},{"style":1053},[1240],{"type":998,"value":1241},"(",{"type":993,"tag":1026,"props":1243,"children":1244},{"style":1047},[1245],{"type":998,"value":1246},"Payment",{"type":993,"tag":1026,"props":1248,"children":1249},{"style":1053},[1250],{"type":998,"value":1251},"):\n",{"type":993,"tag":1026,"props":1253,"children":1254},{"class":1028,"line":127},[1255,1259,1263,1268],{"type":993,"tag":1026,"props":1256,"children":1257},{"style":1041},[1258],{"type":998,"value":1064},{"type":993,"tag":1026,"props":1260,"children":1261},{"style":1047},[1262],{"type":998,"value":1118},{"type":993,"tag":1026,"props":1264,"children":1265},{"style":1053},[1266],{"type":998,"value":1267},"(self):  ",{"type":993,"tag":1026,"props":1269,"children":1270},{"style":1032},[1271],{"type":998,"value":1272},"# Override process method\n",{"type":993,"tag":1026,"props":1274,"children":1275},{"class":1028,"line":136},[1276,1280,1284,1288,1292,1296,1300],{"type":993,"tag":1026,"props":1277,"children":1278},{"style":1041},[1279],{"type":998,"value":1131},{"type":993,"tag":1026,"props":1281,"children":1282},{"style":1041},[1283],{"type":998,"value":1136},{"type":993,"tag":1026,"props":1285,"children":1286},{"style":1139},[1287],{"type":998,"value":1142},{"type":993,"tag":1026,"props":1289,"children":1290},{"style":1067},[1291],{"type":998,"value":1147},{"type":993,"tag":1026,"props":1293,"children":1294},{"style":1053},[1295],{"type":998,"value":1152},{"type":993,"tag":1026,"props":1297,"children":1298},{"style":1067},[1299],{"type":998,"value":1157},{"type":993,"tag":1026,"props":1301,"children":1302},{"style":1139},[1303],{"type":998,"value":1304}," via credit card\"\n",{"type":993,"tag":1026,"props":1306,"children":1307},{"class":1028,"line":146},[1308],{"type":993,"tag":1026,"props":1309,"children":1310},{"style":1053},[1311],{"type":998,"value":1106},{"type":993,"tag":1026,"props":1313,"children":1314},{"class":1028,"line":155},[1315,1319,1323,1327],{"type":993,"tag":1026,"props":1316,"children":1317},{"style":1041},[1318],{"type":998,"value":1064},{"type":993,"tag":1026,"props":1320,"children":1321},{"style":1047},[1322],{"type":998,"value":1181},{"type":993,"tag":1026,"props":1324,"children":1325},{"style":1053},[1326],{"type":998,"value":1267},{"type":993,"tag":1026,"props":1328,"children":1329},{"style":1032},[1330],{"type":998,"value":1331},"# Override fee calculation\n",{"type":993,"tag":1026,"props":1333,"children":1334},{"class":1028,"line":164},[1335,1339,1343,1347,1351,1356],{"type":993,"tag":1026,"props":1336,"children":1337},{"style":1041},[1338],{"type":998,"value":1131},{"type":993,"tag":1026,"props":1340,"children":1341},{"style":1067},[1342],{"type":998,"value":1197},{"type":993,"tag":1026,"props":1344,"children":1345},{"style":1053},[1346],{"type":998,"value":1088},{"type":993,"tag":1026,"props":1348,"children":1349},{"style":1041},[1350],{"type":998,"value":1206},{"type":993,"tag":1026,"props":1352,"children":1353},{"style":1067},[1354],{"type":998,"value":1355}," 0.025",{"type":993,"tag":1026,"props":1357,"children":1358},{"style":1032},[1359],{"type":998,"value":1360},"  # 2.5% for credit cards\n",{"type":993,"tag":1026,"props":1362,"children":1363},{"class":1028,"line":173},[1364],{"type":993,"tag":1026,"props":1365,"children":1366},{"emptyLinePlaceholder":13},[1367],{"type":998,"value":1224},{"type":993,"tag":1026,"props":1369,"children":1370},{"class":1028,"line":182},[1371,1375,1380,1384,1388],{"type":993,"tag":1026,"props":1372,"children":1373},{"style":1041},[1374],{"type":998,"value":1044},{"type":993,"tag":1026,"props":1376,"children":1377},{"style":1047},[1378],{"type":998,"value":1379}," PayPal",{"type":993,"tag":1026,"props":1381,"children":1382},{"style":1053},[1383],{"type":998,"value":1241},{"type":993,"tag":1026,"props":1385,"children":1386},{"style":1047},[1387],{"type":998,"value":1246},{"type":993,"tag":1026,"props":1389,"children":1390},{"style":1053},[1391],{"type":998,"value":1251},{"type":993,"tag":1026,"props":1393,"children":1394},{"class":1028,"line":191},[1395,1399,1403,1407],{"type":993,"tag":1026,"props":1396,"children":1397},{"style":1041},[1398],{"type":998,"value":1064},{"type":993,"tag":1026,"props":1400,"children":1401},{"style":1047},[1402],{"type":998,"value":1118},{"type":993,"tag":1026,"props":1404,"children":1405},{"style":1053},[1406],{"type":998,"value":1267},{"type":993,"tag":1026,"props":1408,"children":1409},{"style":1032},[1410],{"type":998,"value":1272},{"type":993,"tag":1026,"props":1412,"children":1413},{"class":1028,"line":201},[1414,1418,1422,1426,1430,1434,1438],{"type":993,"tag":1026,"props":1415,"children":1416},{"style":1041},[1417],{"type":998,"value":1131},{"type":993,"tag":1026,"props":1419,"children":1420},{"style":1041},[1421],{"type":998,"value":1136},{"type":993,"tag":1026,"props":1423,"children":1424},{"style":1139},[1425],{"type":998,"value":1142},{"type":993,"tag":1026,"props":1427,"children":1428},{"style":1067},[1429],{"type":998,"value":1147},{"type":993,"tag":1026,"props":1431,"children":1432},{"style":1053},[1433],{"type":998,"value":1152},{"type":993,"tag":1026,"props":1435,"children":1436},{"style":1067},[1437],{"type":998,"value":1157},{"type":993,"tag":1026,"props":1439,"children":1440},{"style":1139},[1441],{"type":998,"value":1442}," via PayPal\"\n",{"type":993,"tag":1026,"props":1444,"children":1445},{"class":1028,"line":210},[1446],{"type":993,"tag":1026,"props":1447,"children":1448},{"style":1053},[1449],{"type":998,"value":1106},{"type":993,"tag":1026,"props":1451,"children":1452},{"class":1028,"line":219},[1453,1457,1461,1465],{"type":993,"tag":1026,"props":1454,"children":1455},{"style":1041},[1456],{"type":998,"value":1064},{"type":993,"tag":1026,"props":1458,"children":1459},{"style":1047},[1460],{"type":998,"value":1181},{"type":993,"tag":1026,"props":1462,"children":1463},{"style":1053},[1464],{"type":998,"value":1267},{"type":993,"tag":1026,"props":1466,"children":1467},{"style":1032},[1468],{"type":998,"value":1331},{"type":993,"tag":1026,"props":1470,"children":1471},{"class":1028,"line":228},[1472,1476,1480,1484,1488,1493,1498,1503],{"type":993,"tag":1026,"props":1473,"children":1474},{"style":1041},[1475],{"type":998,"value":1131},{"type":993,"tag":1026,"props":1477,"children":1478},{"style":1067},[1479],{"type":998,"value":1197},{"type":993,"tag":1026,"props":1481,"children":1482},{"style":1053},[1483],{"type":998,"value":1088},{"type":993,"tag":1026,"props":1485,"children":1486},{"style":1041},[1487],{"type":998,"value":1206},{"type":993,"tag":1026,"props":1489,"children":1490},{"style":1067},[1491],{"type":998,"value":1492}," 0.035",{"type":993,"tag":1026,"props":1494,"children":1495},{"style":1041},[1496],{"type":998,"value":1497}," +",{"type":993,"tag":1026,"props":1499,"children":1500},{"style":1067},[1501],{"type":998,"value":1502}," 0.30",{"type":993,"tag":1026,"props":1504,"children":1505},{"style":1032},[1506],{"type":998,"value":1507},"  # 3.5% + $0.30\n",{"type":993,"tag":1026,"props":1509,"children":1510},{"class":1028,"line":238},[1511],{"type":993,"tag":1026,"props":1512,"children":1513},{"emptyLinePlaceholder":13},[1514],{"type":998,"value":1224},{"type":993,"tag":1026,"props":1516,"children":1517},{"class":1028,"line":247},[1518],{"type":993,"tag":1026,"props":1519,"children":1520},{"style":1032},[1521],{"type":998,"value":1522},"# Each payment type processes differently\n",{"type":993,"tag":1026,"props":1524,"children":1525},{"class":1028,"line":256},[1526,1531,1535,1540,1545],{"type":993,"tag":1026,"props":1527,"children":1528},{"style":1053},[1529],{"type":998,"value":1530},"credit ",{"type":993,"tag":1026,"props":1532,"children":1533},{"style":1041},[1534],{"type":998,"value":1093},{"type":993,"tag":1026,"props":1536,"children":1537},{"style":1053},[1538],{"type":998,"value":1539}," CreditCard(",{"type":993,"tag":1026,"props":1541,"children":1542},{"style":1067},[1543],{"type":998,"value":1544},"100",{"type":993,"tag":1026,"props":1546,"children":1547},{"style":1053},[1548],{"type":998,"value":1549},")\n",{"type":993,"tag":1026,"props":1551,"children":1552},{"class":1028,"line":265},[1553,1558,1562,1567,1571],{"type":993,"tag":1026,"props":1554,"children":1555},{"style":1053},[1556],{"type":998,"value":1557},"paypal ",{"type":993,"tag":1026,"props":1559,"children":1560},{"style":1041},[1561],{"type":998,"value":1093},{"type":993,"tag":1026,"props":1563,"children":1564},{"style":1053},[1565],{"type":998,"value":1566}," PayPal(",{"type":993,"tag":1026,"props":1568,"children":1569},{"style":1067},[1570],{"type":998,"value":1544},{"type":993,"tag":1026,"props":1572,"children":1573},{"style":1053},[1574],{"type":998,"value":1549},{"type":993,"tag":1026,"props":1576,"children":1577},{"class":1028,"line":274},[1578],{"type":993,"tag":1026,"props":1579,"children":1580},{"emptyLinePlaceholder":13},[1581],{"type":998,"value":1224},{"type":993,"tag":1026,"props":1583,"children":1584},{"class":1028,"line":284},[1585,1590,1595],{"type":993,"tag":1026,"props":1586,"children":1587},{"style":1067},[1588],{"type":998,"value":1589},"print",{"type":993,"tag":1026,"props":1591,"children":1592},{"style":1053},[1593],{"type":998,"value":1594},"(credit.process())  ",{"type":993,"tag":1026,"props":1596,"children":1597},{"style":1032},[1598],{"type":998,"value":1599},"# Credit card version\n",{"type":993,"tag":1026,"props":1601,"children":1602},{"class":1028,"line":293},[1603,1607,1611,1616,1621,1626,1631,1635,1640],{"type":993,"tag":1026,"props":1604,"children":1605},{"style":1067},[1606],{"type":998,"value":1589},{"type":993,"tag":1026,"props":1608,"children":1609},{"style":1053},[1610],{"type":998,"value":1241},{"type":993,"tag":1026,"props":1612,"children":1613},{"style":1041},[1614],{"type":998,"value":1615},"f",{"type":993,"tag":1026,"props":1617,"children":1618},{"style":1139},[1619],{"type":998,"value":1620},"\"Fee: $",{"type":993,"tag":1026,"props":1622,"children":1623},{"style":1067},[1624],{"type":998,"value":1625},"{",{"type":993,"tag":1026,"props":1627,"children":1628},{"style":1053},[1629],{"type":998,"value":1630},"credit.get_fee()",{"type":993,"tag":1026,"props":1632,"children":1633},{"style":1067},[1634],{"type":998,"value":1157},{"type":993,"tag":1026,"props":1636,"children":1637},{"style":1139},[1638],{"type":998,"value":1639},"\"",{"type":993,"tag":1026,"props":1641,"children":1642},{"style":1053},[1643],{"type":998,"value":1549},{"type":993,"tag":1026,"props":1645,"children":1646},{"class":1028,"line":302},[1647,1651,1656],{"type":993,"tag":1026,"props":1648,"children":1649},{"style":1067},[1650],{"type":998,"value":1589},{"type":993,"tag":1026,"props":1652,"children":1653},{"style":1053},[1654],{"type":998,"value":1655},"(paypal.process())  ",{"type":993,"tag":1026,"props":1657,"children":1658},{"style":1032},[1659],{"type":998,"value":1660},"# PayPal version\n",{"type":993,"tag":1026,"props":1662,"children":1663},{"class":1028,"line":311},[1664,1668,1672,1676,1680,1684,1689,1694,1698,1702],{"type":993,"tag":1026,"props":1665,"children":1666},{"style":1067},[1667],{"type":998,"value":1589},{"type":993,"tag":1026,"props":1669,"children":1670},{"style":1053},[1671],{"type":998,"value":1241},{"type":993,"tag":1026,"props":1673,"children":1674},{"style":1041},[1675],{"type":998,"value":1615},{"type":993,"tag":1026,"props":1677,"children":1678},{"style":1139},[1679],{"type":998,"value":1620},{"type":993,"tag":1026,"props":1681,"children":1682},{"style":1067},[1683],{"type":998,"value":1625},{"type":993,"tag":1026,"props":1685,"children":1686},{"style":1053},[1687],{"type":998,"value":1688},"paypal.get_fee()",{"type":993,"tag":1026,"props":1690,"children":1691},{"style":1041},[1692],{"type":998,"value":1693},":.2f",{"type":993,"tag":1026,"props":1695,"children":1696},{"style":1067},[1697],{"type":998,"value":1157},{"type":993,"tag":1026,"props":1699,"children":1700},{"style":1139},[1701],{"type":998,"value":1639},{"type":993,"tag":1026,"props":1703,"children":1704},{"style":1053},[1705],{"type":998,"value":1549},{"type":993,"tag":1707,"props":1708,"children":1710},"h2",{"id":1709},"understanding-method-overriding",[1711],{"type":998,"value":1712},"🎯 Understanding Method Overriding",{"type":993,"tag":1001,"props":1714,"children":1715},{},[1716],{"type":998,"value":1717},"Method overriding occurs when a child class defines a method with the same name and signature as a method in its parent class. The child's version replaces the parent's version for instances of the child class.",{"type":993,"tag":1719,"props":1720,"children":1724},"info-box",{"emoji":1721,"title":1722,"type":1723},"🔧","Overriding Fundamentals","info",[1725,1734,1754,1762,1805,1813],{"type":993,"tag":1001,"props":1726,"children":1727},{},[1728],{"type":993,"tag":1729,"props":1730,"children":1731},"strong",{},[1732],{"type":998,"value":1733},"What Gets Overridden:",{"type":993,"tag":1735,"props":1736,"children":1737},"ul",{},[1738,1744,1749],{"type":993,"tag":1739,"props":1740,"children":1741},"li",{},[1742],{"type":998,"value":1743},"Methods with identical names and parameter signatures",{"type":993,"tag":1739,"props":1745,"children":1746},{},[1747],{"type":998,"value":1748},"The child version completely replaces the parent version",{"type":993,"tag":1739,"props":1750,"children":1751},{},[1752],{"type":998,"value":1753},"Only affects instances of the child class, not the parent",{"type":993,"tag":1001,"props":1755,"children":1756},{},[1757],{"type":993,"tag":1729,"props":1758,"children":1759},{},[1760],{"type":998,"value":1761},"Key Benefits:",{"type":993,"tag":1735,"props":1763,"children":1764},{},[1765,1775,1785,1795],{"type":993,"tag":1739,"props":1766,"children":1767},{},[1768,1773],{"type":993,"tag":1729,"props":1769,"children":1770},{},[1771],{"type":998,"value":1772},"Customization",{"type":998,"value":1774},": Tailor behavior to specific class needs",{"type":993,"tag":1739,"props":1776,"children":1777},{},[1778,1783],{"type":993,"tag":1729,"props":1779,"children":1780},{},[1781],{"type":998,"value":1782},"Polymorphism",{"type":998,"value":1784},": Different classes can respond to same method calls differently",{"type":993,"tag":1739,"props":1786,"children":1787},{},[1788,1793],{"type":993,"tag":1729,"props":1789,"children":1790},{},[1791],{"type":998,"value":1792},"Interface Consistency",{"type":998,"value":1794},": Maintain same method names across hierarchy",{"type":993,"tag":1739,"props":1796,"children":1797},{},[1798,1803],{"type":993,"tag":1729,"props":1799,"children":1800},{},[1801],{"type":998,"value":1802},"Flexibility",{"type":998,"value":1804},": Add specialized logic while preserving inheritance structure",{"type":993,"tag":1001,"props":1806,"children":1807},{},[1808],{"type":993,"tag":1729,"props":1809,"children":1810},{},[1811],{"type":998,"value":1812},"Common Use Cases:",{"type":993,"tag":1735,"props":1814,"children":1815},{},[1816,1821,1826,1831],{"type":993,"tag":1739,"props":1817,"children":1818},{},[1819],{"type":998,"value":1820},"Specialized calculations or algorithms",{"type":993,"tag":1739,"props":1822,"children":1823},{},[1824],{"type":998,"value":1825},"Different data formatting or display methods",{"type":993,"tag":1739,"props":1827,"children":1828},{},[1829],{"type":998,"value":1830},"Custom validation or processing logic",{"type":993,"tag":1739,"props":1832,"children":1833},{},[1834],{"type":998,"value":1835},"Platform-specific implementations",{"type":993,"tag":1837,"props":1838,"children":1840},"h3",{"id":1839},"basic-method-overriding",[1841],{"type":998,"value":1842},"Basic Method Overriding",{"type":993,"tag":1001,"props":1844,"children":1845},{},[1846],{"type":998,"value":1847},"When you define a method in a child class with the same name as a parent method, the child version automatically takes precedence.",{"type":993,"tag":1012,"props":1849,"children":1850},{},[1851],{"type":993,"tag":1016,"props":1852,"children":1854},{"className":1018,"code":1853,"language":6,"meta":8,"style":8},"class Document:\n    def __init__(self, title):\n        self.title = title\n    \n    def save(self):\n        return f\"Saving document: {self.title}\"\n    \n    def get_info(self):\n        return f\"Document: {self.title}\"\n\nclass PDFDocument(Document):\n    def save(self):  # Override parent save method\n        return f\"Saving PDF: {self.title} with compression\"\n    \n    def get_info(self):  # Override parent get_info method\n        return f\"PDF Document: {self.title} (Portable Format)\"\n\nclass WordDocument(Document):\n    def save(self):  # Override parent save method\n        return f\"Saving Word document: {self.title} with auto-save\"\n\n# Each document type saves differently\npdf = PDFDocument(\"Python Guide\")\nword = WordDocument(\"Meeting Notes\")\n\nprint(pdf.save())     # Uses PDF-specific save\nprint(pdf.get_info()) # Uses PDF-specific info\nprint(word.save())    # Uses Word-specific save\nprint(word.get_info()) # Uses inherited method (not overridden)\n",[1855],{"type":993,"tag":1022,"props":1856,"children":1857},{"__ignoreMap":8},[1858,1874,1890,1911,1918,1934,1968,1975,1991,2023,2030,2055,2075,2108,2115,2135,2168,2175,2199,2218,2251,2258,2266,2292,2318,2325,2342,2359,2376],{"type":993,"tag":1026,"props":1859,"children":1860},{"class":1028,"line":12},[1861,1865,1870],{"type":993,"tag":1026,"props":1862,"children":1863},{"style":1041},[1864],{"type":998,"value":1044},{"type":993,"tag":1026,"props":1866,"children":1867},{"style":1047},[1868],{"type":998,"value":1869}," Document",{"type":993,"tag":1026,"props":1871,"children":1872},{"style":1053},[1873],{"type":998,"value":1056},{"type":993,"tag":1026,"props":1875,"children":1876},{"class":1028,"line":27},[1877,1881,1885],{"type":993,"tag":1026,"props":1878,"children":1879},{"style":1041},[1880],{"type":998,"value":1064},{"type":993,"tag":1026,"props":1882,"children":1883},{"style":1067},[1884],{"type":998,"value":1070},{"type":993,"tag":1026,"props":1886,"children":1887},{"style":1053},[1888],{"type":998,"value":1889},"(self, title):\n",{"type":993,"tag":1026,"props":1891,"children":1892},{"class":1028,"line":36},[1893,1897,1902,1906],{"type":993,"tag":1026,"props":1894,"children":1895},{"style":1067},[1896],{"type":998,"value":1083},{"type":993,"tag":1026,"props":1898,"children":1899},{"style":1053},[1900],{"type":998,"value":1901},".title ",{"type":993,"tag":1026,"props":1903,"children":1904},{"style":1041},[1905],{"type":998,"value":1093},{"type":993,"tag":1026,"props":1907,"children":1908},{"style":1053},[1909],{"type":998,"value":1910}," title\n",{"type":993,"tag":1026,"props":1912,"children":1913},{"class":1028,"line":45},[1914],{"type":993,"tag":1026,"props":1915,"children":1916},{"style":1053},[1917],{"type":998,"value":1106},{"type":993,"tag":1026,"props":1919,"children":1920},{"class":1028,"line":54},[1921,1925,1930],{"type":993,"tag":1026,"props":1922,"children":1923},{"style":1041},[1924],{"type":998,"value":1064},{"type":993,"tag":1026,"props":1926,"children":1927},{"style":1047},[1928],{"type":998,"value":1929}," save",{"type":993,"tag":1026,"props":1931,"children":1932},{"style":1053},[1933],{"type":998,"value":1123},{"type":993,"tag":1026,"props":1935,"children":1936},{"class":1028,"line":63},[1937,1941,1945,1950,1954,1959,1963],{"type":993,"tag":1026,"props":1938,"children":1939},{"style":1041},[1940],{"type":998,"value":1131},{"type":993,"tag":1026,"props":1942,"children":1943},{"style":1041},[1944],{"type":998,"value":1136},{"type":993,"tag":1026,"props":1946,"children":1947},{"style":1139},[1948],{"type":998,"value":1949},"\"Saving document: ",{"type":993,"tag":1026,"props":1951,"children":1952},{"style":1067},[1953],{"type":998,"value":1147},{"type":993,"tag":1026,"props":1955,"children":1956},{"style":1053},[1957],{"type":998,"value":1958},".title",{"type":993,"tag":1026,"props":1960,"children":1961},{"style":1067},[1962],{"type":998,"value":1157},{"type":993,"tag":1026,"props":1964,"children":1965},{"style":1139},[1966],{"type":998,"value":1967},"\"\n",{"type":993,"tag":1026,"props":1969,"children":1970},{"class":1028,"line":72},[1971],{"type":993,"tag":1026,"props":1972,"children":1973},{"style":1053},[1974],{"type":998,"value":1106},{"type":993,"tag":1026,"props":1976,"children":1977},{"class":1028,"line":81},[1978,1982,1987],{"type":993,"tag":1026,"props":1979,"children":1980},{"style":1041},[1981],{"type":998,"value":1064},{"type":993,"tag":1026,"props":1983,"children":1984},{"style":1047},[1985],{"type":998,"value":1986}," get_info",{"type":993,"tag":1026,"props":1988,"children":1989},{"style":1053},[1990],{"type":998,"value":1123},{"type":993,"tag":1026,"props":1992,"children":1993},{"class":1028,"line":91},[1994,1998,2002,2007,2011,2015,2019],{"type":993,"tag":1026,"props":1995,"children":1996},{"style":1041},[1997],{"type":998,"value":1131},{"type":993,"tag":1026,"props":1999,"children":2000},{"style":1041},[2001],{"type":998,"value":1136},{"type":993,"tag":1026,"props":2003,"children":2004},{"style":1139},[2005],{"type":998,"value":2006},"\"Document: ",{"type":993,"tag":1026,"props":2008,"children":2009},{"style":1067},[2010],{"type":998,"value":1147},{"type":993,"tag":1026,"props":2012,"children":2013},{"style":1053},[2014],{"type":998,"value":1958},{"type":993,"tag":1026,"props":2016,"children":2017},{"style":1067},[2018],{"type":998,"value":1157},{"type":993,"tag":1026,"props":2020,"children":2021},{"style":1139},[2022],{"type":998,"value":1967},{"type":993,"tag":1026,"props":2024,"children":2025},{"class":1028,"line":100},[2026],{"type":993,"tag":1026,"props":2027,"children":2028},{"emptyLinePlaceholder":13},[2029],{"type":998,"value":1224},{"type":993,"tag":1026,"props":2031,"children":2032},{"class":1028,"line":109},[2033,2037,2042,2046,2051],{"type":993,"tag":1026,"props":2034,"children":2035},{"style":1041},[2036],{"type":998,"value":1044},{"type":993,"tag":1026,"props":2038,"children":2039},{"style":1047},[2040],{"type":998,"value":2041}," PDFDocument",{"type":993,"tag":1026,"props":2043,"children":2044},{"style":1053},[2045],{"type":998,"value":1241},{"type":993,"tag":1026,"props":2047,"children":2048},{"style":1047},[2049],{"type":998,"value":2050},"Document",{"type":993,"tag":1026,"props":2052,"children":2053},{"style":1053},[2054],{"type":998,"value":1251},{"type":993,"tag":1026,"props":2056,"children":2057},{"class":1028,"line":118},[2058,2062,2066,2070],{"type":993,"tag":1026,"props":2059,"children":2060},{"style":1041},[2061],{"type":998,"value":1064},{"type":993,"tag":1026,"props":2063,"children":2064},{"style":1047},[2065],{"type":998,"value":1929},{"type":993,"tag":1026,"props":2067,"children":2068},{"style":1053},[2069],{"type":998,"value":1267},{"type":993,"tag":1026,"props":2071,"children":2072},{"style":1032},[2073],{"type":998,"value":2074},"# Override parent save method\n",{"type":993,"tag":1026,"props":2076,"children":2077},{"class":1028,"line":127},[2078,2082,2086,2091,2095,2099,2103],{"type":993,"tag":1026,"props":2079,"children":2080},{"style":1041},[2081],{"type":998,"value":1131},{"type":993,"tag":1026,"props":2083,"children":2084},{"style":1041},[2085],{"type":998,"value":1136},{"type":993,"tag":1026,"props":2087,"children":2088},{"style":1139},[2089],{"type":998,"value":2090},"\"Saving PDF: ",{"type":993,"tag":1026,"props":2092,"children":2093},{"style":1067},[2094],{"type":998,"value":1147},{"type":993,"tag":1026,"props":2096,"children":2097},{"style":1053},[2098],{"type":998,"value":1958},{"type":993,"tag":1026,"props":2100,"children":2101},{"style":1067},[2102],{"type":998,"value":1157},{"type":993,"tag":1026,"props":2104,"children":2105},{"style":1139},[2106],{"type":998,"value":2107}," with compression\"\n",{"type":993,"tag":1026,"props":2109,"children":2110},{"class":1028,"line":136},[2111],{"type":993,"tag":1026,"props":2112,"children":2113},{"style":1053},[2114],{"type":998,"value":1106},{"type":993,"tag":1026,"props":2116,"children":2117},{"class":1028,"line":146},[2118,2122,2126,2130],{"type":993,"tag":1026,"props":2119,"children":2120},{"style":1041},[2121],{"type":998,"value":1064},{"type":993,"tag":1026,"props":2123,"children":2124},{"style":1047},[2125],{"type":998,"value":1986},{"type":993,"tag":1026,"props":2127,"children":2128},{"style":1053},[2129],{"type":998,"value":1267},{"type":993,"tag":1026,"props":2131,"children":2132},{"style":1032},[2133],{"type":998,"value":2134},"# Override parent get_info method\n",{"type":993,"tag":1026,"props":2136,"children":2137},{"class":1028,"line":155},[2138,2142,2146,2151,2155,2159,2163],{"type":993,"tag":1026,"props":2139,"children":2140},{"style":1041},[2141],{"type":998,"value":1131},{"type":993,"tag":1026,"props":2143,"children":2144},{"style":1041},[2145],{"type":998,"value":1136},{"type":993,"tag":1026,"props":2147,"children":2148},{"style":1139},[2149],{"type":998,"value":2150},"\"PDF Document: ",{"type":993,"tag":1026,"props":2152,"children":2153},{"style":1067},[2154],{"type":998,"value":1147},{"type":993,"tag":1026,"props":2156,"children":2157},{"style":1053},[2158],{"type":998,"value":1958},{"type":993,"tag":1026,"props":2160,"children":2161},{"style":1067},[2162],{"type":998,"value":1157},{"type":993,"tag":1026,"props":2164,"children":2165},{"style":1139},[2166],{"type":998,"value":2167}," (Portable Format)\"\n",{"type":993,"tag":1026,"props":2169,"children":2170},{"class":1028,"line":164},[2171],{"type":993,"tag":1026,"props":2172,"children":2173},{"emptyLinePlaceholder":13},[2174],{"type":998,"value":1224},{"type":993,"tag":1026,"props":2176,"children":2177},{"class":1028,"line":173},[2178,2182,2187,2191,2195],{"type":993,"tag":1026,"props":2179,"children":2180},{"style":1041},[2181],{"type":998,"value":1044},{"type":993,"tag":1026,"props":2183,"children":2184},{"style":1047},[2185],{"type":998,"value":2186}," WordDocument",{"type":993,"tag":1026,"props":2188,"children":2189},{"style":1053},[2190],{"type":998,"value":1241},{"type":993,"tag":1026,"props":2192,"children":2193},{"style":1047},[2194],{"type":998,"value":2050},{"type":993,"tag":1026,"props":2196,"children":2197},{"style":1053},[2198],{"type":998,"value":1251},{"type":993,"tag":1026,"props":2200,"children":2201},{"class":1028,"line":182},[2202,2206,2210,2214],{"type":993,"tag":1026,"props":2203,"children":2204},{"style":1041},[2205],{"type":998,"value":1064},{"type":993,"tag":1026,"props":2207,"children":2208},{"style":1047},[2209],{"type":998,"value":1929},{"type":993,"tag":1026,"props":2211,"children":2212},{"style":1053},[2213],{"type":998,"value":1267},{"type":993,"tag":1026,"props":2215,"children":2216},{"style":1032},[2217],{"type":998,"value":2074},{"type":993,"tag":1026,"props":2219,"children":2220},{"class":1028,"line":191},[2221,2225,2229,2234,2238,2242,2246],{"type":993,"tag":1026,"props":2222,"children":2223},{"style":1041},[2224],{"type":998,"value":1131},{"type":993,"tag":1026,"props":2226,"children":2227},{"style":1041},[2228],{"type":998,"value":1136},{"type":993,"tag":1026,"props":2230,"children":2231},{"style":1139},[2232],{"type":998,"value":2233},"\"Saving Word document: ",{"type":993,"tag":1026,"props":2235,"children":2236},{"style":1067},[2237],{"type":998,"value":1147},{"type":993,"tag":1026,"props":2239,"children":2240},{"style":1053},[2241],{"type":998,"value":1958},{"type":993,"tag":1026,"props":2243,"children":2244},{"style":1067},[2245],{"type":998,"value":1157},{"type":993,"tag":1026,"props":2247,"children":2248},{"style":1139},[2249],{"type":998,"value":2250}," with auto-save\"\n",{"type":993,"tag":1026,"props":2252,"children":2253},{"class":1028,"line":201},[2254],{"type":993,"tag":1026,"props":2255,"children":2256},{"emptyLinePlaceholder":13},[2257],{"type":998,"value":1224},{"type":993,"tag":1026,"props":2259,"children":2260},{"class":1028,"line":210},[2261],{"type":993,"tag":1026,"props":2262,"children":2263},{"style":1032},[2264],{"type":998,"value":2265},"# Each document type saves differently\n",{"type":993,"tag":1026,"props":2267,"children":2268},{"class":1028,"line":219},[2269,2274,2278,2283,2288],{"type":993,"tag":1026,"props":2270,"children":2271},{"style":1053},[2272],{"type":998,"value":2273},"pdf ",{"type":993,"tag":1026,"props":2275,"children":2276},{"style":1041},[2277],{"type":998,"value":1093},{"type":993,"tag":1026,"props":2279,"children":2280},{"style":1053},[2281],{"type":998,"value":2282}," PDFDocument(",{"type":993,"tag":1026,"props":2284,"children":2285},{"style":1139},[2286],{"type":998,"value":2287},"\"Python Guide\"",{"type":993,"tag":1026,"props":2289,"children":2290},{"style":1053},[2291],{"type":998,"value":1549},{"type":993,"tag":1026,"props":2293,"children":2294},{"class":1028,"line":228},[2295,2300,2304,2309,2314],{"type":993,"tag":1026,"props":2296,"children":2297},{"style":1053},[2298],{"type":998,"value":2299},"word ",{"type":993,"tag":1026,"props":2301,"children":2302},{"style":1041},[2303],{"type":998,"value":1093},{"type":993,"tag":1026,"props":2305,"children":2306},{"style":1053},[2307],{"type":998,"value":2308}," WordDocument(",{"type":993,"tag":1026,"props":2310,"children":2311},{"style":1139},[2312],{"type":998,"value":2313},"\"Meeting Notes\"",{"type":993,"tag":1026,"props":2315,"children":2316},{"style":1053},[2317],{"type":998,"value":1549},{"type":993,"tag":1026,"props":2319,"children":2320},{"class":1028,"line":238},[2321],{"type":993,"tag":1026,"props":2322,"children":2323},{"emptyLinePlaceholder":13},[2324],{"type":998,"value":1224},{"type":993,"tag":1026,"props":2326,"children":2327},{"class":1028,"line":247},[2328,2332,2337],{"type":993,"tag":1026,"props":2329,"children":2330},{"style":1067},[2331],{"type":998,"value":1589},{"type":993,"tag":1026,"props":2333,"children":2334},{"style":1053},[2335],{"type":998,"value":2336},"(pdf.save())     ",{"type":993,"tag":1026,"props":2338,"children":2339},{"style":1032},[2340],{"type":998,"value":2341},"# Uses PDF-specific save\n",{"type":993,"tag":1026,"props":2343,"children":2344},{"class":1028,"line":256},[2345,2349,2354],{"type":993,"tag":1026,"props":2346,"children":2347},{"style":1067},[2348],{"type":998,"value":1589},{"type":993,"tag":1026,"props":2350,"children":2351},{"style":1053},[2352],{"type":998,"value":2353},"(pdf.get_info()) ",{"type":993,"tag":1026,"props":2355,"children":2356},{"style":1032},[2357],{"type":998,"value":2358},"# Uses PDF-specific info\n",{"type":993,"tag":1026,"props":2360,"children":2361},{"class":1028,"line":265},[2362,2366,2371],{"type":993,"tag":1026,"props":2363,"children":2364},{"style":1067},[2365],{"type":998,"value":1589},{"type":993,"tag":1026,"props":2367,"children":2368},{"style":1053},[2369],{"type":998,"value":2370},"(word.save())    ",{"type":993,"tag":1026,"props":2372,"children":2373},{"style":1032},[2374],{"type":998,"value":2375},"# Uses Word-specific save\n",{"type":993,"tag":1026,"props":2377,"children":2378},{"class":1028,"line":274},[2379,2383,2388],{"type":993,"tag":1026,"props":2380,"children":2381},{"style":1067},[2382],{"type":998,"value":1589},{"type":993,"tag":1026,"props":2384,"children":2385},{"style":1053},[2386],{"type":998,"value":2387},"(word.get_info()) ",{"type":993,"tag":1026,"props":2389,"children":2390},{"style":1032},[2391],{"type":998,"value":2392},"# Uses inherited method (not overridden)\n",{"type":993,"tag":1837,"props":2394,"children":2396},{"id":2395},"method-signature-matching",[2397],{"type":998,"value":2398},"Method Signature Matching",{"type":993,"tag":1001,"props":2400,"children":2401},{},[2402],{"type":998,"value":2403},"For overriding to work correctly, the child method must have the same name and compatible parameter signature as the parent method.",{"type":993,"tag":1012,"props":2405,"children":2406},{},[2407],{"type":993,"tag":1016,"props":2408,"children":2410},{"className":1018,"code":2409,"language":6,"meta":8,"style":8},"class Calculator:\n    def calculate(self, operation, a, b):\n        if operation == \"add\":\n            return a + b\n        return 0\n    \n    def display_result(self, result):\n        return f\"Result: {result}\"\n\nclass ScientificCalculator(Calculator):\n    def calculate(self, operation, a, b):  # Correct override - same signature\n        if operation == \"add\":\n            return a + b\n        elif operation == \"power\":\n            return a ** b\n        elif operation == \"sqrt\":\n            return a ** 0.5\n        return 0\n    \n    def display_result(self, result):  # Correct override\n        return f\"Scientific Result: {result:.4f}\"\n    \n    def calculate_advanced(self, operation, *args):  # New method - different signature\n        if operation == \"factorial\" and len(args) == 1:\n            n = args[0]\n            result = 1\n            for i in range(1, n + 1):\n                result *= i\n            return result\n        return 0\n\ncalc = ScientificCalculator()\nprint(calc.calculate(\"power\", 2, 3))  # Uses overridden method\nprint(calc.display_result(8.0000))    # Uses overridden display\nprint(calc.calculate_advanced(\"factorial\", 5))  # Uses new method\n",[2411],{"type":993,"tag":1022,"props":2412,"children":2413},{"__ignoreMap":8},[2414,2430,2447,2474,2497,2509,2516,2533,2566,2573,2598,2619,2642,2661,2686,2706,2730,2750,2761,2768,2789,2826,2833,2864,2912,2939,2956,3005,3023,3035,3046,3053,3070,3116,3143],{"type":993,"tag":1026,"props":2415,"children":2416},{"class":1028,"line":12},[2417,2421,2426],{"type":993,"tag":1026,"props":2418,"children":2419},{"style":1041},[2420],{"type":998,"value":1044},{"type":993,"tag":1026,"props":2422,"children":2423},{"style":1047},[2424],{"type":998,"value":2425}," Calculator",{"type":993,"tag":1026,"props":2427,"children":2428},{"style":1053},[2429],{"type":998,"value":1056},{"type":993,"tag":1026,"props":2431,"children":2432},{"class":1028,"line":27},[2433,2437,2442],{"type":993,"tag":1026,"props":2434,"children":2435},{"style":1041},[2436],{"type":998,"value":1064},{"type":993,"tag":1026,"props":2438,"children":2439},{"style":1047},[2440],{"type":998,"value":2441}," calculate",{"type":993,"tag":1026,"props":2443,"children":2444},{"style":1053},[2445],{"type":998,"value":2446},"(self, operation, a, b):\n",{"type":993,"tag":1026,"props":2448,"children":2449},{"class":1028,"line":36},[2450,2455,2460,2465,2470],{"type":993,"tag":1026,"props":2451,"children":2452},{"style":1041},[2453],{"type":998,"value":2454},"        if",{"type":993,"tag":1026,"props":2456,"children":2457},{"style":1053},[2458],{"type":998,"value":2459}," operation ",{"type":993,"tag":1026,"props":2461,"children":2462},{"style":1041},[2463],{"type":998,"value":2464},"==",{"type":993,"tag":1026,"props":2466,"children":2467},{"style":1139},[2468],{"type":998,"value":2469}," \"add\"",{"type":993,"tag":1026,"props":2471,"children":2472},{"style":1053},[2473],{"type":998,"value":1056},{"type":993,"tag":1026,"props":2475,"children":2476},{"class":1028,"line":45},[2477,2482,2487,2492],{"type":993,"tag":1026,"props":2478,"children":2479},{"style":1041},[2480],{"type":998,"value":2481},"            return",{"type":993,"tag":1026,"props":2483,"children":2484},{"style":1053},[2485],{"type":998,"value":2486}," a ",{"type":993,"tag":1026,"props":2488,"children":2489},{"style":1041},[2490],{"type":998,"value":2491},"+",{"type":993,"tag":1026,"props":2493,"children":2494},{"style":1053},[2495],{"type":998,"value":2496}," b\n",{"type":993,"tag":1026,"props":2498,"children":2499},{"class":1028,"line":54},[2500,2504],{"type":993,"tag":1026,"props":2501,"children":2502},{"style":1041},[2503],{"type":998,"value":1131},{"type":993,"tag":1026,"props":2505,"children":2506},{"style":1067},[2507],{"type":998,"value":2508}," 0\n",{"type":993,"tag":1026,"props":2510,"children":2511},{"class":1028,"line":63},[2512],{"type":993,"tag":1026,"props":2513,"children":2514},{"style":1053},[2515],{"type":998,"value":1106},{"type":993,"tag":1026,"props":2517,"children":2518},{"class":1028,"line":72},[2519,2523,2528],{"type":993,"tag":1026,"props":2520,"children":2521},{"style":1041},[2522],{"type":998,"value":1064},{"type":993,"tag":1026,"props":2524,"children":2525},{"style":1047},[2526],{"type":998,"value":2527}," display_result",{"type":993,"tag":1026,"props":2529,"children":2530},{"style":1053},[2531],{"type":998,"value":2532},"(self, result):\n",{"type":993,"tag":1026,"props":2534,"children":2535},{"class":1028,"line":81},[2536,2540,2544,2549,2553,2558,2562],{"type":993,"tag":1026,"props":2537,"children":2538},{"style":1041},[2539],{"type":998,"value":1131},{"type":993,"tag":1026,"props":2541,"children":2542},{"style":1041},[2543],{"type":998,"value":1136},{"type":993,"tag":1026,"props":2545,"children":2546},{"style":1139},[2547],{"type":998,"value":2548},"\"Result: ",{"type":993,"tag":1026,"props":2550,"children":2551},{"style":1067},[2552],{"type":998,"value":1625},{"type":993,"tag":1026,"props":2554,"children":2555},{"style":1053},[2556],{"type":998,"value":2557},"result",{"type":993,"tag":1026,"props":2559,"children":2560},{"style":1067},[2561],{"type":998,"value":1157},{"type":993,"tag":1026,"props":2563,"children":2564},{"style":1139},[2565],{"type":998,"value":1967},{"type":993,"tag":1026,"props":2567,"children":2568},{"class":1028,"line":91},[2569],{"type":993,"tag":1026,"props":2570,"children":2571},{"emptyLinePlaceholder":13},[2572],{"type":998,"value":1224},{"type":993,"tag":1026,"props":2574,"children":2575},{"class":1028,"line":100},[2576,2580,2585,2589,2594],{"type":993,"tag":1026,"props":2577,"children":2578},{"style":1041},[2579],{"type":998,"value":1044},{"type":993,"tag":1026,"props":2581,"children":2582},{"style":1047},[2583],{"type":998,"value":2584}," ScientificCalculator",{"type":993,"tag":1026,"props":2586,"children":2587},{"style":1053},[2588],{"type":998,"value":1241},{"type":993,"tag":1026,"props":2590,"children":2591},{"style":1047},[2592],{"type":998,"value":2593},"Calculator",{"type":993,"tag":1026,"props":2595,"children":2596},{"style":1053},[2597],{"type":998,"value":1251},{"type":993,"tag":1026,"props":2599,"children":2600},{"class":1028,"line":109},[2601,2605,2609,2614],{"type":993,"tag":1026,"props":2602,"children":2603},{"style":1041},[2604],{"type":998,"value":1064},{"type":993,"tag":1026,"props":2606,"children":2607},{"style":1047},[2608],{"type":998,"value":2441},{"type":993,"tag":1026,"props":2610,"children":2611},{"style":1053},[2612],{"type":998,"value":2613},"(self, operation, a, b):  ",{"type":993,"tag":1026,"props":2615,"children":2616},{"style":1032},[2617],{"type":998,"value":2618},"# Correct override - same signature\n",{"type":993,"tag":1026,"props":2620,"children":2621},{"class":1028,"line":118},[2622,2626,2630,2634,2638],{"type":993,"tag":1026,"props":2623,"children":2624},{"style":1041},[2625],{"type":998,"value":2454},{"type":993,"tag":1026,"props":2627,"children":2628},{"style":1053},[2629],{"type":998,"value":2459},{"type":993,"tag":1026,"props":2631,"children":2632},{"style":1041},[2633],{"type":998,"value":2464},{"type":993,"tag":1026,"props":2635,"children":2636},{"style":1139},[2637],{"type":998,"value":2469},{"type":993,"tag":1026,"props":2639,"children":2640},{"style":1053},[2641],{"type":998,"value":1056},{"type":993,"tag":1026,"props":2643,"children":2644},{"class":1028,"line":127},[2645,2649,2653,2657],{"type":993,"tag":1026,"props":2646,"children":2647},{"style":1041},[2648],{"type":998,"value":2481},{"type":993,"tag":1026,"props":2650,"children":2651},{"style":1053},[2652],{"type":998,"value":2486},{"type":993,"tag":1026,"props":2654,"children":2655},{"style":1041},[2656],{"type":998,"value":2491},{"type":993,"tag":1026,"props":2658,"children":2659},{"style":1053},[2660],{"type":998,"value":2496},{"type":993,"tag":1026,"props":2662,"children":2663},{"class":1028,"line":136},[2664,2669,2673,2677,2682],{"type":993,"tag":1026,"props":2665,"children":2666},{"style":1041},[2667],{"type":998,"value":2668},"        elif",{"type":993,"tag":1026,"props":2670,"children":2671},{"style":1053},[2672],{"type":998,"value":2459},{"type":993,"tag":1026,"props":2674,"children":2675},{"style":1041},[2676],{"type":998,"value":2464},{"type":993,"tag":1026,"props":2678,"children":2679},{"style":1139},[2680],{"type":998,"value":2681}," \"power\"",{"type":993,"tag":1026,"props":2683,"children":2684},{"style":1053},[2685],{"type":998,"value":1056},{"type":993,"tag":1026,"props":2687,"children":2688},{"class":1028,"line":146},[2689,2693,2697,2702],{"type":993,"tag":1026,"props":2690,"children":2691},{"style":1041},[2692],{"type":998,"value":2481},{"type":993,"tag":1026,"props":2694,"children":2695},{"style":1053},[2696],{"type":998,"value":2486},{"type":993,"tag":1026,"props":2698,"children":2699},{"style":1041},[2700],{"type":998,"value":2701},"**",{"type":993,"tag":1026,"props":2703,"children":2704},{"style":1053},[2705],{"type":998,"value":2496},{"type":993,"tag":1026,"props":2707,"children":2708},{"class":1028,"line":155},[2709,2713,2717,2721,2726],{"type":993,"tag":1026,"props":2710,"children":2711},{"style":1041},[2712],{"type":998,"value":2668},{"type":993,"tag":1026,"props":2714,"children":2715},{"style":1053},[2716],{"type":998,"value":2459},{"type":993,"tag":1026,"props":2718,"children":2719},{"style":1041},[2720],{"type":998,"value":2464},{"type":993,"tag":1026,"props":2722,"children":2723},{"style":1139},[2724],{"type":998,"value":2725}," \"sqrt\"",{"type":993,"tag":1026,"props":2727,"children":2728},{"style":1053},[2729],{"type":998,"value":1056},{"type":993,"tag":1026,"props":2731,"children":2732},{"class":1028,"line":164},[2733,2737,2741,2745],{"type":993,"tag":1026,"props":2734,"children":2735},{"style":1041},[2736],{"type":998,"value":2481},{"type":993,"tag":1026,"props":2738,"children":2739},{"style":1053},[2740],{"type":998,"value":2486},{"type":993,"tag":1026,"props":2742,"children":2743},{"style":1041},[2744],{"type":998,"value":2701},{"type":993,"tag":1026,"props":2746,"children":2747},{"style":1067},[2748],{"type":998,"value":2749}," 0.5\n",{"type":993,"tag":1026,"props":2751,"children":2752},{"class":1028,"line":173},[2753,2757],{"type":993,"tag":1026,"props":2754,"children":2755},{"style":1041},[2756],{"type":998,"value":1131},{"type":993,"tag":1026,"props":2758,"children":2759},{"style":1067},[2760],{"type":998,"value":2508},{"type":993,"tag":1026,"props":2762,"children":2763},{"class":1028,"line":182},[2764],{"type":993,"tag":1026,"props":2765,"children":2766},{"style":1053},[2767],{"type":998,"value":1106},{"type":993,"tag":1026,"props":2769,"children":2770},{"class":1028,"line":191},[2771,2775,2779,2784],{"type":993,"tag":1026,"props":2772,"children":2773},{"style":1041},[2774],{"type":998,"value":1064},{"type":993,"tag":1026,"props":2776,"children":2777},{"style":1047},[2778],{"type":998,"value":2527},{"type":993,"tag":1026,"props":2780,"children":2781},{"style":1053},[2782],{"type":998,"value":2783},"(self, result):  ",{"type":993,"tag":1026,"props":2785,"children":2786},{"style":1032},[2787],{"type":998,"value":2788},"# Correct override\n",{"type":993,"tag":1026,"props":2790,"children":2791},{"class":1028,"line":201},[2792,2796,2800,2805,2809,2813,2818,2822],{"type":993,"tag":1026,"props":2793,"children":2794},{"style":1041},[2795],{"type":998,"value":1131},{"type":993,"tag":1026,"props":2797,"children":2798},{"style":1041},[2799],{"type":998,"value":1136},{"type":993,"tag":1026,"props":2801,"children":2802},{"style":1139},[2803],{"type":998,"value":2804},"\"Scientific Result: ",{"type":993,"tag":1026,"props":2806,"children":2807},{"style":1067},[2808],{"type":998,"value":1625},{"type":993,"tag":1026,"props":2810,"children":2811},{"style":1053},[2812],{"type":998,"value":2557},{"type":993,"tag":1026,"props":2814,"children":2815},{"style":1041},[2816],{"type":998,"value":2817},":.4f",{"type":993,"tag":1026,"props":2819,"children":2820},{"style":1067},[2821],{"type":998,"value":1157},{"type":993,"tag":1026,"props":2823,"children":2824},{"style":1139},[2825],{"type":998,"value":1967},{"type":993,"tag":1026,"props":2827,"children":2828},{"class":1028,"line":210},[2829],{"type":993,"tag":1026,"props":2830,"children":2831},{"style":1053},[2832],{"type":998,"value":1106},{"type":993,"tag":1026,"props":2834,"children":2835},{"class":1028,"line":219},[2836,2840,2845,2850,2854,2859],{"type":993,"tag":1026,"props":2837,"children":2838},{"style":1041},[2839],{"type":998,"value":1064},{"type":993,"tag":1026,"props":2841,"children":2842},{"style":1047},[2843],{"type":998,"value":2844}," calculate_advanced",{"type":993,"tag":1026,"props":2846,"children":2847},{"style":1053},[2848],{"type":998,"value":2849},"(self, operation, ",{"type":993,"tag":1026,"props":2851,"children":2852},{"style":1041},[2853],{"type":998,"value":1206},{"type":993,"tag":1026,"props":2855,"children":2856},{"style":1053},[2857],{"type":998,"value":2858},"args):  ",{"type":993,"tag":1026,"props":2860,"children":2861},{"style":1032},[2862],{"type":998,"value":2863},"# New method - different signature\n",{"type":993,"tag":1026,"props":2865,"children":2866},{"class":1028,"line":228},[2867,2871,2875,2879,2884,2889,2894,2899,2903,2908],{"type":993,"tag":1026,"props":2868,"children":2869},{"style":1041},[2870],{"type":998,"value":2454},{"type":993,"tag":1026,"props":2872,"children":2873},{"style":1053},[2874],{"type":998,"value":2459},{"type":993,"tag":1026,"props":2876,"children":2877},{"style":1041},[2878],{"type":998,"value":2464},{"type":993,"tag":1026,"props":2880,"children":2881},{"style":1139},[2882],{"type":998,"value":2883}," \"factorial\"",{"type":993,"tag":1026,"props":2885,"children":2886},{"style":1041},[2887],{"type":998,"value":2888}," and",{"type":993,"tag":1026,"props":2890,"children":2891},{"style":1067},[2892],{"type":998,"value":2893}," len",{"type":993,"tag":1026,"props":2895,"children":2896},{"style":1053},[2897],{"type":998,"value":2898},"(args) ",{"type":993,"tag":1026,"props":2900,"children":2901},{"style":1041},[2902],{"type":998,"value":2464},{"type":993,"tag":1026,"props":2904,"children":2905},{"style":1067},[2906],{"type":998,"value":2907}," 1",{"type":993,"tag":1026,"props":2909,"children":2910},{"style":1053},[2911],{"type":998,"value":1056},{"type":993,"tag":1026,"props":2913,"children":2914},{"class":1028,"line":238},[2915,2920,2924,2929,2934],{"type":993,"tag":1026,"props":2916,"children":2917},{"style":1053},[2918],{"type":998,"value":2919},"            n ",{"type":993,"tag":1026,"props":2921,"children":2922},{"style":1041},[2923],{"type":998,"value":1093},{"type":993,"tag":1026,"props":2925,"children":2926},{"style":1053},[2927],{"type":998,"value":2928}," args[",{"type":993,"tag":1026,"props":2930,"children":2931},{"style":1067},[2932],{"type":998,"value":2933},"0",{"type":993,"tag":1026,"props":2935,"children":2936},{"style":1053},[2937],{"type":998,"value":2938},"]\n",{"type":993,"tag":1026,"props":2940,"children":2941},{"class":1028,"line":247},[2942,2947,2951],{"type":993,"tag":1026,"props":2943,"children":2944},{"style":1053},[2945],{"type":998,"value":2946},"            result ",{"type":993,"tag":1026,"props":2948,"children":2949},{"style":1041},[2950],{"type":998,"value":1093},{"type":993,"tag":1026,"props":2952,"children":2953},{"style":1067},[2954],{"type":998,"value":2955}," 1\n",{"type":993,"tag":1026,"props":2957,"children":2958},{"class":1028,"line":256},[2959,2964,2969,2974,2979,2983,2988,2993,2997,3001],{"type":993,"tag":1026,"props":2960,"children":2961},{"style":1041},[2962],{"type":998,"value":2963},"            for",{"type":993,"tag":1026,"props":2965,"children":2966},{"style":1053},[2967],{"type":998,"value":2968}," i ",{"type":993,"tag":1026,"props":2970,"children":2971},{"style":1041},[2972],{"type":998,"value":2973},"in",{"type":993,"tag":1026,"props":2975,"children":2976},{"style":1067},[2977],{"type":998,"value":2978}," range",{"type":993,"tag":1026,"props":2980,"children":2981},{"style":1053},[2982],{"type":998,"value":1241},{"type":993,"tag":1026,"props":2984,"children":2985},{"style":1067},[2986],{"type":998,"value":2987},"1",{"type":993,"tag":1026,"props":2989,"children":2990},{"style":1053},[2991],{"type":998,"value":2992},", n ",{"type":993,"tag":1026,"props":2994,"children":2995},{"style":1041},[2996],{"type":998,"value":2491},{"type":993,"tag":1026,"props":2998,"children":2999},{"style":1067},[3000],{"type":998,"value":2907},{"type":993,"tag":1026,"props":3002,"children":3003},{"style":1053},[3004],{"type":998,"value":1251},{"type":993,"tag":1026,"props":3006,"children":3007},{"class":1028,"line":265},[3008,3013,3018],{"type":993,"tag":1026,"props":3009,"children":3010},{"style":1053},[3011],{"type":998,"value":3012},"                result ",{"type":993,"tag":1026,"props":3014,"children":3015},{"style":1041},[3016],{"type":998,"value":3017},"*=",{"type":993,"tag":1026,"props":3019,"children":3020},{"style":1053},[3021],{"type":998,"value":3022}," i\n",{"type":993,"tag":1026,"props":3024,"children":3025},{"class":1028,"line":274},[3026,3030],{"type":993,"tag":1026,"props":3027,"children":3028},{"style":1041},[3029],{"type":998,"value":2481},{"type":993,"tag":1026,"props":3031,"children":3032},{"style":1053},[3033],{"type":998,"value":3034}," result\n",{"type":993,"tag":1026,"props":3036,"children":3037},{"class":1028,"line":284},[3038,3042],{"type":993,"tag":1026,"props":3039,"children":3040},{"style":1041},[3041],{"type":998,"value":1131},{"type":993,"tag":1026,"props":3043,"children":3044},{"style":1067},[3045],{"type":998,"value":2508},{"type":993,"tag":1026,"props":3047,"children":3048},{"class":1028,"line":293},[3049],{"type":993,"tag":1026,"props":3050,"children":3051},{"emptyLinePlaceholder":13},[3052],{"type":998,"value":1224},{"type":993,"tag":1026,"props":3054,"children":3055},{"class":1028,"line":302},[3056,3061,3065],{"type":993,"tag":1026,"props":3057,"children":3058},{"style":1053},[3059],{"type":998,"value":3060},"calc ",{"type":993,"tag":1026,"props":3062,"children":3063},{"style":1041},[3064],{"type":998,"value":1093},{"type":993,"tag":1026,"props":3066,"children":3067},{"style":1053},[3068],{"type":998,"value":3069}," ScientificCalculator()\n",{"type":993,"tag":1026,"props":3071,"children":3072},{"class":1028,"line":311},[3073,3077,3082,3087,3092,3097,3101,3106,3111],{"type":993,"tag":1026,"props":3074,"children":3075},{"style":1067},[3076],{"type":998,"value":1589},{"type":993,"tag":1026,"props":3078,"children":3079},{"style":1053},[3080],{"type":998,"value":3081},"(calc.calculate(",{"type":993,"tag":1026,"props":3083,"children":3084},{"style":1139},[3085],{"type":998,"value":3086},"\"power\"",{"type":993,"tag":1026,"props":3088,"children":3089},{"style":1053},[3090],{"type":998,"value":3091},", ",{"type":993,"tag":1026,"props":3093,"children":3094},{"style":1067},[3095],{"type":998,"value":3096},"2",{"type":993,"tag":1026,"props":3098,"children":3099},{"style":1053},[3100],{"type":998,"value":3091},{"type":993,"tag":1026,"props":3102,"children":3103},{"style":1067},[3104],{"type":998,"value":3105},"3",{"type":993,"tag":1026,"props":3107,"children":3108},{"style":1053},[3109],{"type":998,"value":3110},"))  ",{"type":993,"tag":1026,"props":3112,"children":3113},{"style":1032},[3114],{"type":998,"value":3115},"# Uses overridden method\n",{"type":993,"tag":1026,"props":3117,"children":3118},{"class":1028,"line":320},[3119,3123,3128,3133,3138],{"type":993,"tag":1026,"props":3120,"children":3121},{"style":1067},[3122],{"type":998,"value":1589},{"type":993,"tag":1026,"props":3124,"children":3125},{"style":1053},[3126],{"type":998,"value":3127},"(calc.display_result(",{"type":993,"tag":1026,"props":3129,"children":3130},{"style":1067},[3131],{"type":998,"value":3132},"8.0000",{"type":993,"tag":1026,"props":3134,"children":3135},{"style":1053},[3136],{"type":998,"value":3137},"))    ",{"type":993,"tag":1026,"props":3139,"children":3140},{"style":1032},[3141],{"type":998,"value":3142},"# Uses overridden display\n",{"type":993,"tag":1026,"props":3144,"children":3145},{"class":1028,"line":329},[3146,3150,3155,3160,3164,3169,3173],{"type":993,"tag":1026,"props":3147,"children":3148},{"style":1067},[3149],{"type":998,"value":1589},{"type":993,"tag":1026,"props":3151,"children":3152},{"style":1053},[3153],{"type":998,"value":3154},"(calc.calculate_advanced(",{"type":993,"tag":1026,"props":3156,"children":3157},{"style":1139},[3158],{"type":998,"value":3159},"\"factorial\"",{"type":993,"tag":1026,"props":3161,"children":3162},{"style":1053},[3163],{"type":998,"value":3091},{"type":993,"tag":1026,"props":3165,"children":3166},{"style":1067},[3167],{"type":998,"value":3168},"5",{"type":993,"tag":1026,"props":3170,"children":3171},{"style":1053},[3172],{"type":998,"value":3110},{"type":993,"tag":1026,"props":3174,"children":3175},{"style":1032},[3176],{"type":998,"value":3177},"# Uses new method\n",{"type":993,"tag":1707,"props":3179,"children":3181},{"id":3180},"using-super-in-overridden-methods",[3182],{"type":998,"value":3183},"⚡ Using super() in Overridden Methods",{"type":993,"tag":1001,"props":3185,"children":3186},{},[3187,3189,3195],{"type":998,"value":3188},"The ",{"type":993,"tag":1022,"props":3190,"children":3192},{"className":3191},[],[3193],{"type":998,"value":3194},"super()",{"type":998,"value":3196}," function allows you to access parent methods from overridden child methods, enabling you to extend rather than completely replace parent functionality.",{"type":993,"tag":1837,"props":3198,"children":3200},{"id":3199},"extending-parent-behavior",[3201],{"type":998,"value":3202},"Extending Parent Behavior",{"type":993,"tag":1001,"props":3204,"children":3205},{},[3206,3208,3213],{"type":998,"value":3207},"Using ",{"type":993,"tag":1022,"props":3209,"children":3211},{"className":3210},[],[3212],{"type":998,"value":3194},{"type":998,"value":3214}," lets you call the parent method and then add additional functionality, combining inherited behavior with specialized features.",{"type":993,"tag":1012,"props":3216,"children":3217},{},[3218],{"type":993,"tag":1016,"props":3219,"children":3221},{"className":1018,"code":3220,"language":6,"meta":8,"style":8},"class Logger:\n    def __init__(self, name):\n        self.name = name\n        self.messages = []\n    \n    def log(self, message):\n        self.messages.append(message)\n        return f\"Logged: {message}\"\n\nclass TimestampLogger(Logger):\n    def __init__(self, name):\n        super().__init__(name)  # Call parent constructor\n        import datetime\n        self.created = datetime.datetime.now()\n    \n    def log(self, message):\n        # Extend parent behavior\n        import datetime\n        timestamp = datetime.datetime.now().strftime(\"%Y-%m-%d %H:%M:%S\")\n        timestamped_message = f\"[{timestamp}] {message}\"\n        \n        # Call parent method with modified message\n        return super().log(timestamped_message)\n\nclass FileLogger(TimestampLogger):\n    def __init__(self, name, filename):\n        super().__init__(name)  # Call parent constructor\n        self.filename = filename\n    \n    def log(self, message):\n        # Further extend behavior\n        result = super().log(message)  # Gets timestamped message\n        # Simulate file writing\n        file_msg = f\"Written to {self.filename}: {message}\"\n        return f\"{result} | {file_msg}\"\n\n# Layered behavior extension\nfile_logger = FileLogger(\"AppLogger\", \"app.log\")\nprint(file_logger.log(\"User logged in\"))\nprint(f\"Messages stored: {len(file_logger.messages)}\")\n",[3222],{"type":993,"tag":1022,"props":3223,"children":3224},{"__ignoreMap":8},[3225,3241,3257,3278,3299,3306,3323,3335,3368,3375,3400,3415,3443,3456,3477,3484,3499,3507,3518,3554,3609,3617,3625,3642,3649,3674,3690,3713,3734,3741,3756,3764,3790,3798,3853,3902,3909,3917,3952,3974],{"type":993,"tag":1026,"props":3226,"children":3227},{"class":1028,"line":12},[3228,3232,3237],{"type":993,"tag":1026,"props":3229,"children":3230},{"style":1041},[3231],{"type":998,"value":1044},{"type":993,"tag":1026,"props":3233,"children":3234},{"style":1047},[3235],{"type":998,"value":3236}," Logger",{"type":993,"tag":1026,"props":3238,"children":3239},{"style":1053},[3240],{"type":998,"value":1056},{"type":993,"tag":1026,"props":3242,"children":3243},{"class":1028,"line":27},[3244,3248,3252],{"type":993,"tag":1026,"props":3245,"children":3246},{"style":1041},[3247],{"type":998,"value":1064},{"type":993,"tag":1026,"props":3249,"children":3250},{"style":1067},[3251],{"type":998,"value":1070},{"type":993,"tag":1026,"props":3253,"children":3254},{"style":1053},[3255],{"type":998,"value":3256},"(self, name):\n",{"type":993,"tag":1026,"props":3258,"children":3259},{"class":1028,"line":36},[3260,3264,3269,3273],{"type":993,"tag":1026,"props":3261,"children":3262},{"style":1067},[3263],{"type":998,"value":1083},{"type":993,"tag":1026,"props":3265,"children":3266},{"style":1053},[3267],{"type":998,"value":3268},".name ",{"type":993,"tag":1026,"props":3270,"children":3271},{"style":1041},[3272],{"type":998,"value":1093},{"type":993,"tag":1026,"props":3274,"children":3275},{"style":1053},[3276],{"type":998,"value":3277}," name\n",{"type":993,"tag":1026,"props":3279,"children":3280},{"class":1028,"line":45},[3281,3285,3290,3294],{"type":993,"tag":1026,"props":3282,"children":3283},{"style":1067},[3284],{"type":998,"value":1083},{"type":993,"tag":1026,"props":3286,"children":3287},{"style":1053},[3288],{"type":998,"value":3289},".messages ",{"type":993,"tag":1026,"props":3291,"children":3292},{"style":1041},[3293],{"type":998,"value":1093},{"type":993,"tag":1026,"props":3295,"children":3296},{"style":1053},[3297],{"type":998,"value":3298}," []\n",{"type":993,"tag":1026,"props":3300,"children":3301},{"class":1028,"line":54},[3302],{"type":993,"tag":1026,"props":3303,"children":3304},{"style":1053},[3305],{"type":998,"value":1106},{"type":993,"tag":1026,"props":3307,"children":3308},{"class":1028,"line":63},[3309,3313,3318],{"type":993,"tag":1026,"props":3310,"children":3311},{"style":1041},[3312],{"type":998,"value":1064},{"type":993,"tag":1026,"props":3314,"children":3315},{"style":1047},[3316],{"type":998,"value":3317}," log",{"type":993,"tag":1026,"props":3319,"children":3320},{"style":1053},[3321],{"type":998,"value":3322},"(self, message):\n",{"type":993,"tag":1026,"props":3324,"children":3325},{"class":1028,"line":72},[3326,3330],{"type":993,"tag":1026,"props":3327,"children":3328},{"style":1067},[3329],{"type":998,"value":1083},{"type":993,"tag":1026,"props":3331,"children":3332},{"style":1053},[3333],{"type":998,"value":3334},".messages.append(message)\n",{"type":993,"tag":1026,"props":3336,"children":3337},{"class":1028,"line":81},[3338,3342,3346,3351,3355,3360,3364],{"type":993,"tag":1026,"props":3339,"children":3340},{"style":1041},[3341],{"type":998,"value":1131},{"type":993,"tag":1026,"props":3343,"children":3344},{"style":1041},[3345],{"type":998,"value":1136},{"type":993,"tag":1026,"props":3347,"children":3348},{"style":1139},[3349],{"type":998,"value":3350},"\"Logged: ",{"type":993,"tag":1026,"props":3352,"children":3353},{"style":1067},[3354],{"type":998,"value":1625},{"type":993,"tag":1026,"props":3356,"children":3357},{"style":1053},[3358],{"type":998,"value":3359},"message",{"type":993,"tag":1026,"props":3361,"children":3362},{"style":1067},[3363],{"type":998,"value":1157},{"type":993,"tag":1026,"props":3365,"children":3366},{"style":1139},[3367],{"type":998,"value":1967},{"type":993,"tag":1026,"props":3369,"children":3370},{"class":1028,"line":91},[3371],{"type":993,"tag":1026,"props":3372,"children":3373},{"emptyLinePlaceholder":13},[3374],{"type":998,"value":1224},{"type":993,"tag":1026,"props":3376,"children":3377},{"class":1028,"line":100},[3378,3382,3387,3391,3396],{"type":993,"tag":1026,"props":3379,"children":3380},{"style":1041},[3381],{"type":998,"value":1044},{"type":993,"tag":1026,"props":3383,"children":3384},{"style":1047},[3385],{"type":998,"value":3386}," TimestampLogger",{"type":993,"tag":1026,"props":3388,"children":3389},{"style":1053},[3390],{"type":998,"value":1241},{"type":993,"tag":1026,"props":3392,"children":3393},{"style":1047},[3394],{"type":998,"value":3395},"Logger",{"type":993,"tag":1026,"props":3397,"children":3398},{"style":1053},[3399],{"type":998,"value":1251},{"type":993,"tag":1026,"props":3401,"children":3402},{"class":1028,"line":109},[3403,3407,3411],{"type":993,"tag":1026,"props":3404,"children":3405},{"style":1041},[3406],{"type":998,"value":1064},{"type":993,"tag":1026,"props":3408,"children":3409},{"style":1067},[3410],{"type":998,"value":1070},{"type":993,"tag":1026,"props":3412,"children":3413},{"style":1053},[3414],{"type":998,"value":3256},{"type":993,"tag":1026,"props":3416,"children":3417},{"class":1028,"line":118},[3418,3423,3428,3433,3438],{"type":993,"tag":1026,"props":3419,"children":3420},{"style":1067},[3421],{"type":998,"value":3422},"        super",{"type":993,"tag":1026,"props":3424,"children":3425},{"style":1053},[3426],{"type":998,"value":3427},"().",{"type":993,"tag":1026,"props":3429,"children":3430},{"style":1067},[3431],{"type":998,"value":3432},"__init__",{"type":993,"tag":1026,"props":3434,"children":3435},{"style":1053},[3436],{"type":998,"value":3437},"(name)  ",{"type":993,"tag":1026,"props":3439,"children":3440},{"style":1032},[3441],{"type":998,"value":3442},"# Call parent constructor\n",{"type":993,"tag":1026,"props":3444,"children":3445},{"class":1028,"line":127},[3446,3451],{"type":993,"tag":1026,"props":3447,"children":3448},{"style":1041},[3449],{"type":998,"value":3450},"        import",{"type":993,"tag":1026,"props":3452,"children":3453},{"style":1053},[3454],{"type":998,"value":3455}," datetime\n",{"type":993,"tag":1026,"props":3457,"children":3458},{"class":1028,"line":136},[3459,3463,3468,3472],{"type":993,"tag":1026,"props":3460,"children":3461},{"style":1067},[3462],{"type":998,"value":1083},{"type":993,"tag":1026,"props":3464,"children":3465},{"style":1053},[3466],{"type":998,"value":3467},".created ",{"type":993,"tag":1026,"props":3469,"children":3470},{"style":1041},[3471],{"type":998,"value":1093},{"type":993,"tag":1026,"props":3473,"children":3474},{"style":1053},[3475],{"type":998,"value":3476}," datetime.datetime.now()\n",{"type":993,"tag":1026,"props":3478,"children":3479},{"class":1028,"line":146},[3480],{"type":993,"tag":1026,"props":3481,"children":3482},{"style":1053},[3483],{"type":998,"value":1106},{"type":993,"tag":1026,"props":3485,"children":3486},{"class":1028,"line":155},[3487,3491,3495],{"type":993,"tag":1026,"props":3488,"children":3489},{"style":1041},[3490],{"type":998,"value":1064},{"type":993,"tag":1026,"props":3492,"children":3493},{"style":1047},[3494],{"type":998,"value":3317},{"type":993,"tag":1026,"props":3496,"children":3497},{"style":1053},[3498],{"type":998,"value":3322},{"type":993,"tag":1026,"props":3500,"children":3501},{"class":1028,"line":164},[3502],{"type":993,"tag":1026,"props":3503,"children":3504},{"style":1032},[3505],{"type":998,"value":3506},"        # Extend parent behavior\n",{"type":993,"tag":1026,"props":3508,"children":3509},{"class":1028,"line":173},[3510,3514],{"type":993,"tag":1026,"props":3511,"children":3512},{"style":1041},[3513],{"type":998,"value":3450},{"type":993,"tag":1026,"props":3515,"children":3516},{"style":1053},[3517],{"type":998,"value":3455},{"type":993,"tag":1026,"props":3519,"children":3520},{"class":1028,"line":182},[3521,3526,3530,3535,3540,3545,3550],{"type":993,"tag":1026,"props":3522,"children":3523},{"style":1053},[3524],{"type":998,"value":3525},"        timestamp ",{"type":993,"tag":1026,"props":3527,"children":3528},{"style":1041},[3529],{"type":998,"value":1093},{"type":993,"tag":1026,"props":3531,"children":3532},{"style":1053},[3533],{"type":998,"value":3534}," datetime.datetime.now().strftime(",{"type":993,"tag":1026,"props":3536,"children":3537},{"style":1139},[3538],{"type":998,"value":3539},"\"%Y-%m-",{"type":993,"tag":1026,"props":3541,"children":3542},{"style":1067},[3543],{"type":998,"value":3544},"%d",{"type":993,"tag":1026,"props":3546,"children":3547},{"style":1139},[3548],{"type":998,"value":3549}," %H:%M:%S\"",{"type":993,"tag":1026,"props":3551,"children":3552},{"style":1053},[3553],{"type":998,"value":1549},{"type":993,"tag":1026,"props":3555,"children":3556},{"class":1028,"line":191},[3557,3562,3566,3570,3575,3579,3584,3588,3593,3597,3601,3605],{"type":993,"tag":1026,"props":3558,"children":3559},{"style":1053},[3560],{"type":998,"value":3561},"        timestamped_message ",{"type":993,"tag":1026,"props":3563,"children":3564},{"style":1041},[3565],{"type":998,"value":1093},{"type":993,"tag":1026,"props":3567,"children":3568},{"style":1041},[3569],{"type":998,"value":1136},{"type":993,"tag":1026,"props":3571,"children":3572},{"style":1139},[3573],{"type":998,"value":3574},"\"[",{"type":993,"tag":1026,"props":3576,"children":3577},{"style":1067},[3578],{"type":998,"value":1625},{"type":993,"tag":1026,"props":3580,"children":3581},{"style":1053},[3582],{"type":998,"value":3583},"timestamp",{"type":993,"tag":1026,"props":3585,"children":3586},{"style":1067},[3587],{"type":998,"value":1157},{"type":993,"tag":1026,"props":3589,"children":3590},{"style":1139},[3591],{"type":998,"value":3592},"] ",{"type":993,"tag":1026,"props":3594,"children":3595},{"style":1067},[3596],{"type":998,"value":1625},{"type":993,"tag":1026,"props":3598,"children":3599},{"style":1053},[3600],{"type":998,"value":3359},{"type":993,"tag":1026,"props":3602,"children":3603},{"style":1067},[3604],{"type":998,"value":1157},{"type":993,"tag":1026,"props":3606,"children":3607},{"style":1139},[3608],{"type":998,"value":1967},{"type":993,"tag":1026,"props":3610,"children":3611},{"class":1028,"line":201},[3612],{"type":993,"tag":1026,"props":3613,"children":3614},{"style":1053},[3615],{"type":998,"value":3616},"        \n",{"type":993,"tag":1026,"props":3618,"children":3619},{"class":1028,"line":210},[3620],{"type":993,"tag":1026,"props":3621,"children":3622},{"style":1032},[3623],{"type":998,"value":3624},"        # Call parent method with modified message\n",{"type":993,"tag":1026,"props":3626,"children":3627},{"class":1028,"line":219},[3628,3632,3637],{"type":993,"tag":1026,"props":3629,"children":3630},{"style":1041},[3631],{"type":998,"value":1131},{"type":993,"tag":1026,"props":3633,"children":3634},{"style":1067},[3635],{"type":998,"value":3636}," super",{"type":993,"tag":1026,"props":3638,"children":3639},{"style":1053},[3640],{"type":998,"value":3641},"().log(timestamped_message)\n",{"type":993,"tag":1026,"props":3643,"children":3644},{"class":1028,"line":228},[3645],{"type":993,"tag":1026,"props":3646,"children":3647},{"emptyLinePlaceholder":13},[3648],{"type":998,"value":1224},{"type":993,"tag":1026,"props":3650,"children":3651},{"class":1028,"line":238},[3652,3656,3661,3665,3670],{"type":993,"tag":1026,"props":3653,"children":3654},{"style":1041},[3655],{"type":998,"value":1044},{"type":993,"tag":1026,"props":3657,"children":3658},{"style":1047},[3659],{"type":998,"value":3660}," FileLogger",{"type":993,"tag":1026,"props":3662,"children":3663},{"style":1053},[3664],{"type":998,"value":1241},{"type":993,"tag":1026,"props":3666,"children":3667},{"style":1047},[3668],{"type":998,"value":3669},"TimestampLogger",{"type":993,"tag":1026,"props":3671,"children":3672},{"style":1053},[3673],{"type":998,"value":1251},{"type":993,"tag":1026,"props":3675,"children":3676},{"class":1028,"line":247},[3677,3681,3685],{"type":993,"tag":1026,"props":3678,"children":3679},{"style":1041},[3680],{"type":998,"value":1064},{"type":993,"tag":1026,"props":3682,"children":3683},{"style":1067},[3684],{"type":998,"value":1070},{"type":993,"tag":1026,"props":3686,"children":3687},{"style":1053},[3688],{"type":998,"value":3689},"(self, name, filename):\n",{"type":993,"tag":1026,"props":3691,"children":3692},{"class":1028,"line":256},[3693,3697,3701,3705,3709],{"type":993,"tag":1026,"props":3694,"children":3695},{"style":1067},[3696],{"type":998,"value":3422},{"type":993,"tag":1026,"props":3698,"children":3699},{"style":1053},[3700],{"type":998,"value":3427},{"type":993,"tag":1026,"props":3702,"children":3703},{"style":1067},[3704],{"type":998,"value":3432},{"type":993,"tag":1026,"props":3706,"children":3707},{"style":1053},[3708],{"type":998,"value":3437},{"type":993,"tag":1026,"props":3710,"children":3711},{"style":1032},[3712],{"type":998,"value":3442},{"type":993,"tag":1026,"props":3714,"children":3715},{"class":1028,"line":265},[3716,3720,3725,3729],{"type":993,"tag":1026,"props":3717,"children":3718},{"style":1067},[3719],{"type":998,"value":1083},{"type":993,"tag":1026,"props":3721,"children":3722},{"style":1053},[3723],{"type":998,"value":3724},".filename ",{"type":993,"tag":1026,"props":3726,"children":3727},{"style":1041},[3728],{"type":998,"value":1093},{"type":993,"tag":1026,"props":3730,"children":3731},{"style":1053},[3732],{"type":998,"value":3733}," filename\n",{"type":993,"tag":1026,"props":3735,"children":3736},{"class":1028,"line":274},[3737],{"type":993,"tag":1026,"props":3738,"children":3739},{"style":1053},[3740],{"type":998,"value":1106},{"type":993,"tag":1026,"props":3742,"children":3743},{"class":1028,"line":284},[3744,3748,3752],{"type":993,"tag":1026,"props":3745,"children":3746},{"style":1041},[3747],{"type":998,"value":1064},{"type":993,"tag":1026,"props":3749,"children":3750},{"style":1047},[3751],{"type":998,"value":3317},{"type":993,"tag":1026,"props":3753,"children":3754},{"style":1053},[3755],{"type":998,"value":3322},{"type":993,"tag":1026,"props":3757,"children":3758},{"class":1028,"line":293},[3759],{"type":993,"tag":1026,"props":3760,"children":3761},{"style":1032},[3762],{"type":998,"value":3763},"        # Further extend behavior\n",{"type":993,"tag":1026,"props":3765,"children":3766},{"class":1028,"line":302},[3767,3772,3776,3780,3785],{"type":993,"tag":1026,"props":3768,"children":3769},{"style":1053},[3770],{"type":998,"value":3771},"        result ",{"type":993,"tag":1026,"props":3773,"children":3774},{"style":1041},[3775],{"type":998,"value":1093},{"type":993,"tag":1026,"props":3777,"children":3778},{"style":1067},[3779],{"type":998,"value":3636},{"type":993,"tag":1026,"props":3781,"children":3782},{"style":1053},[3783],{"type":998,"value":3784},"().log(message)  ",{"type":993,"tag":1026,"props":3786,"children":3787},{"style":1032},[3788],{"type":998,"value":3789},"# Gets timestamped message\n",{"type":993,"tag":1026,"props":3791,"children":3792},{"class":1028,"line":311},[3793],{"type":993,"tag":1026,"props":3794,"children":3795},{"style":1032},[3796],{"type":998,"value":3797},"        # Simulate file writing\n",{"type":993,"tag":1026,"props":3799,"children":3800},{"class":1028,"line":320},[3801,3806,3810,3814,3819,3823,3828,3832,3837,3841,3845,3849],{"type":993,"tag":1026,"props":3802,"children":3803},{"style":1053},[3804],{"type":998,"value":3805},"        file_msg ",{"type":993,"tag":1026,"props":3807,"children":3808},{"style":1041},[3809],{"type":998,"value":1093},{"type":993,"tag":1026,"props":3811,"children":3812},{"style":1041},[3813],{"type":998,"value":1136},{"type":993,"tag":1026,"props":3815,"children":3816},{"style":1139},[3817],{"type":998,"value":3818},"\"Written to ",{"type":993,"tag":1026,"props":3820,"children":3821},{"style":1067},[3822],{"type":998,"value":1147},{"type":993,"tag":1026,"props":3824,"children":3825},{"style":1053},[3826],{"type":998,"value":3827},".filename",{"type":993,"tag":1026,"props":3829,"children":3830},{"style":1067},[3831],{"type":998,"value":1157},{"type":993,"tag":1026,"props":3833,"children":3834},{"style":1139},[3835],{"type":998,"value":3836},": ",{"type":993,"tag":1026,"props":3838,"children":3839},{"style":1067},[3840],{"type":998,"value":1625},{"type":993,"tag":1026,"props":3842,"children":3843},{"style":1053},[3844],{"type":998,"value":3359},{"type":993,"tag":1026,"props":3846,"children":3847},{"style":1067},[3848],{"type":998,"value":1157},{"type":993,"tag":1026,"props":3850,"children":3851},{"style":1139},[3852],{"type":998,"value":1967},{"type":993,"tag":1026,"props":3854,"children":3855},{"class":1028,"line":329},[3856,3860,3864,3868,3872,3876,3880,3885,3889,3894,3898],{"type":993,"tag":1026,"props":3857,"children":3858},{"style":1041},[3859],{"type":998,"value":1131},{"type":993,"tag":1026,"props":3861,"children":3862},{"style":1041},[3863],{"type":998,"value":1136},{"type":993,"tag":1026,"props":3865,"children":3866},{"style":1139},[3867],{"type":998,"value":1639},{"type":993,"tag":1026,"props":3869,"children":3870},{"style":1067},[3871],{"type":998,"value":1625},{"type":993,"tag":1026,"props":3873,"children":3874},{"style":1053},[3875],{"type":998,"value":2557},{"type":993,"tag":1026,"props":3877,"children":3878},{"style":1067},[3879],{"type":998,"value":1157},{"type":993,"tag":1026,"props":3881,"children":3882},{"style":1139},[3883],{"type":998,"value":3884}," | ",{"type":993,"tag":1026,"props":3886,"children":3887},{"style":1067},[3888],{"type":998,"value":1625},{"type":993,"tag":1026,"props":3890,"children":3891},{"style":1053},[3892],{"type":998,"value":3893},"file_msg",{"type":993,"tag":1026,"props":3895,"children":3896},{"style":1067},[3897],{"type":998,"value":1157},{"type":993,"tag":1026,"props":3899,"children":3900},{"style":1139},[3901],{"type":998,"value":1967},{"type":993,"tag":1026,"props":3903,"children":3904},{"class":1028,"line":338},[3905],{"type":993,"tag":1026,"props":3906,"children":3907},{"emptyLinePlaceholder":13},[3908],{"type":998,"value":1224},{"type":993,"tag":1026,"props":3910,"children":3911},{"class":1028,"line":347},[3912],{"type":993,"tag":1026,"props":3913,"children":3914},{"style":1032},[3915],{"type":998,"value":3916},"# Layered behavior extension\n",{"type":993,"tag":1026,"props":3918,"children":3919},{"class":1028,"line":356},[3920,3925,3929,3934,3939,3943,3948],{"type":993,"tag":1026,"props":3921,"children":3922},{"style":1053},[3923],{"type":998,"value":3924},"file_logger ",{"type":993,"tag":1026,"props":3926,"children":3927},{"style":1041},[3928],{"type":998,"value":1093},{"type":993,"tag":1026,"props":3930,"children":3931},{"style":1053},[3932],{"type":998,"value":3933}," FileLogger(",{"type":993,"tag":1026,"props":3935,"children":3936},{"style":1139},[3937],{"type":998,"value":3938},"\"AppLogger\"",{"type":993,"tag":1026,"props":3940,"children":3941},{"style":1053},[3942],{"type":998,"value":3091},{"type":993,"tag":1026,"props":3944,"children":3945},{"style":1139},[3946],{"type":998,"value":3947},"\"app.log\"",{"type":993,"tag":1026,"props":3949,"children":3950},{"style":1053},[3951],{"type":998,"value":1549},{"type":993,"tag":1026,"props":3953,"children":3954},{"class":1028,"line":365},[3955,3959,3964,3969],{"type":993,"tag":1026,"props":3956,"children":3957},{"style":1067},[3958],{"type":998,"value":1589},{"type":993,"tag":1026,"props":3960,"children":3961},{"style":1053},[3962],{"type":998,"value":3963},"(file_logger.log(",{"type":993,"tag":1026,"props":3965,"children":3966},{"style":1139},[3967],{"type":998,"value":3968},"\"User logged in\"",{"type":993,"tag":1026,"props":3970,"children":3971},{"style":1053},[3972],{"type":998,"value":3973},"))\n",{"type":993,"tag":1026,"props":3975,"children":3976},{"class":1028,"line":374},[3977,3981,3985,3989,3994,3999,4004,4008,4012],{"type":993,"tag":1026,"props":3978,"children":3979},{"style":1067},[3980],{"type":998,"value":1589},{"type":993,"tag":1026,"props":3982,"children":3983},{"style":1053},[3984],{"type":998,"value":1241},{"type":993,"tag":1026,"props":3986,"children":3987},{"style":1041},[3988],{"type":998,"value":1615},{"type":993,"tag":1026,"props":3990,"children":3991},{"style":1139},[3992],{"type":998,"value":3993},"\"Messages stored: ",{"type":993,"tag":1026,"props":3995,"children":3996},{"style":1067},[3997],{"type":998,"value":3998},"{len",{"type":993,"tag":1026,"props":4000,"children":4001},{"style":1053},[4002],{"type":998,"value":4003},"(file_logger.messages)",{"type":993,"tag":1026,"props":4005,"children":4006},{"style":1067},[4007],{"type":998,"value":1157},{"type":993,"tag":1026,"props":4009,"children":4010},{"style":1139},[4011],{"type":998,"value":1639},{"type":993,"tag":1026,"props":4013,"children":4014},{"style":1053},[4015],{"type":998,"value":1549},{"type":993,"tag":1837,"props":4017,"children":4019},{"id":4018},"conditional-parent-calls",[4020],{"type":998,"value":4021},"Conditional Parent Calls",{"type":993,"tag":1001,"props":4023,"children":4024},{},[4025],{"type":998,"value":4026},"Sometimes you want to call the parent method only under certain conditions, giving you fine-grained control over when inherited behavior applies.",{"type":993,"tag":1012,"props":4028,"children":4029},{},[4030],{"type":993,"tag":1016,"props":4031,"children":4033},{"className":1018,"code":4032,"language":6,"meta":8,"style":8},"class Validator:\n    def validate(self, data):\n        if not data:\n            return False, \"Data is required\"\n        return True, \"Valid\"\n\nclass EmailValidator(Validator):\n    def validate(self, data):\n        # First check basic validation\n        is_valid, message = super().validate(data)\n        if not is_valid:\n            return is_valid, message\n        \n        # Add email-specific validation\n        if \"@\" not in data:\n            return False, \"Email must contain @\"\n        if \".\" not in data.split(\"@\")[1]:\n            return False, \"Email domain must contain .\"\n        \n        return True, \"Valid email\"\n\nclass StrictEmailValidator(EmailValidator):\n    def __init__(self, allowed_domains):\n        self.allowed_domains = allowed_domains\n    \n    def validate(self, data):\n        # Call parent validation first\n        is_valid, message = super().validate(data)\n        if not is_valid:\n            return is_valid, message\n        \n        # Add domain restriction\n        domain = data.split(\"@\")[1]\n        if domain not in self.allowed_domains:\n            return False, f\"Domain {domain} not allowed\"\n        \n        return True, \"Valid email from approved domain\"\n\n# Layered validation\nbasic = Validator()\nemail = EmailValidator()\nstrict = StrictEmailValidator([\"company.com\", \"partner.org\"])\n\ntest_data = [\"\", \"invalid\", \"test@example.com\", \"user@company.com\"]\n\nfor data in test_data:\n    print(f\"Data: '{data}'\")\n    print(f\"  Basic: {basic.validate(data)}\")\n    print(f\"  Email: {email.validate(data)}\")\n    print(f\"  Strict: {strict.validate(data)}\")\n",[4034],{"type":993,"tag":1022,"props":4035,"children":4036},{"__ignoreMap":8},[4037,4053,4070,4087,4108,4129,4136,4161,4176,4184,4205,4221,4233,4240,4248,4273,4293,4337,4357,4364,4384,4391,4416,4432,4453,4460,4475,4483,4502,4517,4528,4535,4543,4575,4605,4647,4654,4674,4681,4689,4706,4723,4759,4766,4819,4826,4848,4891,4932,4973],{"type":993,"tag":1026,"props":4038,"children":4039},{"class":1028,"line":12},[4040,4044,4049],{"type":993,"tag":1026,"props":4041,"children":4042},{"style":1041},[4043],{"type":998,"value":1044},{"type":993,"tag":1026,"props":4045,"children":4046},{"style":1047},[4047],{"type":998,"value":4048}," Validator",{"type":993,"tag":1026,"props":4050,"children":4051},{"style":1053},[4052],{"type":998,"value":1056},{"type":993,"tag":1026,"props":4054,"children":4055},{"class":1028,"line":27},[4056,4060,4065],{"type":993,"tag":1026,"props":4057,"children":4058},{"style":1041},[4059],{"type":998,"value":1064},{"type":993,"tag":1026,"props":4061,"children":4062},{"style":1047},[4063],{"type":998,"value":4064}," validate",{"type":993,"tag":1026,"props":4066,"children":4067},{"style":1053},[4068],{"type":998,"value":4069},"(self, data):\n",{"type":993,"tag":1026,"props":4071,"children":4072},{"class":1028,"line":36},[4073,4077,4082],{"type":993,"tag":1026,"props":4074,"children":4075},{"style":1041},[4076],{"type":998,"value":2454},{"type":993,"tag":1026,"props":4078,"children":4079},{"style":1041},[4080],{"type":998,"value":4081}," not",{"type":993,"tag":1026,"props":4083,"children":4084},{"style":1053},[4085],{"type":998,"value":4086}," data:\n",{"type":993,"tag":1026,"props":4088,"children":4089},{"class":1028,"line":45},[4090,4094,4099,4103],{"type":993,"tag":1026,"props":4091,"children":4092},{"style":1041},[4093],{"type":998,"value":2481},{"type":993,"tag":1026,"props":4095,"children":4096},{"style":1067},[4097],{"type":998,"value":4098}," False",{"type":993,"tag":1026,"props":4100,"children":4101},{"style":1053},[4102],{"type":998,"value":3091},{"type":993,"tag":1026,"props":4104,"children":4105},{"style":1139},[4106],{"type":998,"value":4107},"\"Data is required\"\n",{"type":993,"tag":1026,"props":4109,"children":4110},{"class":1028,"line":54},[4111,4115,4120,4124],{"type":993,"tag":1026,"props":4112,"children":4113},{"style":1041},[4114],{"type":998,"value":1131},{"type":993,"tag":1026,"props":4116,"children":4117},{"style":1067},[4118],{"type":998,"value":4119}," True",{"type":993,"tag":1026,"props":4121,"children":4122},{"style":1053},[4123],{"type":998,"value":3091},{"type":993,"tag":1026,"props":4125,"children":4126},{"style":1139},[4127],{"type":998,"value":4128},"\"Valid\"\n",{"type":993,"tag":1026,"props":4130,"children":4131},{"class":1028,"line":63},[4132],{"type":993,"tag":1026,"props":4133,"children":4134},{"emptyLinePlaceholder":13},[4135],{"type":998,"value":1224},{"type":993,"tag":1026,"props":4137,"children":4138},{"class":1028,"line":72},[4139,4143,4148,4152,4157],{"type":993,"tag":1026,"props":4140,"children":4141},{"style":1041},[4142],{"type":998,"value":1044},{"type":993,"tag":1026,"props":4144,"children":4145},{"style":1047},[4146],{"type":998,"value":4147}," EmailValidator",{"type":993,"tag":1026,"props":4149,"children":4150},{"style":1053},[4151],{"type":998,"value":1241},{"type":993,"tag":1026,"props":4153,"children":4154},{"style":1047},[4155],{"type":998,"value":4156},"Validator",{"type":993,"tag":1026,"props":4158,"children":4159},{"style":1053},[4160],{"type":998,"value":1251},{"type":993,"tag":1026,"props":4162,"children":4163},{"class":1028,"line":81},[4164,4168,4172],{"type":993,"tag":1026,"props":4165,"children":4166},{"style":1041},[4167],{"type":998,"value":1064},{"type":993,"tag":1026,"props":4169,"children":4170},{"style":1047},[4171],{"type":998,"value":4064},{"type":993,"tag":1026,"props":4173,"children":4174},{"style":1053},[4175],{"type":998,"value":4069},{"type":993,"tag":1026,"props":4177,"children":4178},{"class":1028,"line":91},[4179],{"type":993,"tag":1026,"props":4180,"children":4181},{"style":1032},[4182],{"type":998,"value":4183},"        # First check basic validation\n",{"type":993,"tag":1026,"props":4185,"children":4186},{"class":1028,"line":100},[4187,4192,4196,4200],{"type":993,"tag":1026,"props":4188,"children":4189},{"style":1053},[4190],{"type":998,"value":4191},"        is_valid, message ",{"type":993,"tag":1026,"props":4193,"children":4194},{"style":1041},[4195],{"type":998,"value":1093},{"type":993,"tag":1026,"props":4197,"children":4198},{"style":1067},[4199],{"type":998,"value":3636},{"type":993,"tag":1026,"props":4201,"children":4202},{"style":1053},[4203],{"type":998,"value":4204},"().validate(data)\n",{"type":993,"tag":1026,"props":4206,"children":4207},{"class":1028,"line":109},[4208,4212,4216],{"type":993,"tag":1026,"props":4209,"children":4210},{"style":1041},[4211],{"type":998,"value":2454},{"type":993,"tag":1026,"props":4213,"children":4214},{"style":1041},[4215],{"type":998,"value":4081},{"type":993,"tag":1026,"props":4217,"children":4218},{"style":1053},[4219],{"type":998,"value":4220}," is_valid:\n",{"type":993,"tag":1026,"props":4222,"children":4223},{"class":1028,"line":118},[4224,4228],{"type":993,"tag":1026,"props":4225,"children":4226},{"style":1041},[4227],{"type":998,"value":2481},{"type":993,"tag":1026,"props":4229,"children":4230},{"style":1053},[4231],{"type":998,"value":4232}," is_valid, message\n",{"type":993,"tag":1026,"props":4234,"children":4235},{"class":1028,"line":127},[4236],{"type":993,"tag":1026,"props":4237,"children":4238},{"style":1053},[4239],{"type":998,"value":3616},{"type":993,"tag":1026,"props":4241,"children":4242},{"class":1028,"line":136},[4243],{"type":993,"tag":1026,"props":4244,"children":4245},{"style":1032},[4246],{"type":998,"value":4247},"        # Add email-specific validation\n",{"type":993,"tag":1026,"props":4249,"children":4250},{"class":1028,"line":146},[4251,4255,4260,4264,4269],{"type":993,"tag":1026,"props":4252,"children":4253},{"style":1041},[4254],{"type":998,"value":2454},{"type":993,"tag":1026,"props":4256,"children":4257},{"style":1139},[4258],{"type":998,"value":4259}," \"@\"",{"type":993,"tag":1026,"props":4261,"children":4262},{"style":1041},[4263],{"type":998,"value":4081},{"type":993,"tag":1026,"props":4265,"children":4266},{"style":1041},[4267],{"type":998,"value":4268}," in",{"type":993,"tag":1026,"props":4270,"children":4271},{"style":1053},[4272],{"type":998,"value":4086},{"type":993,"tag":1026,"props":4274,"children":4275},{"class":1028,"line":155},[4276,4280,4284,4288],{"type":993,"tag":1026,"props":4277,"children":4278},{"style":1041},[4279],{"type":998,"value":2481},{"type":993,"tag":1026,"props":4281,"children":4282},{"style":1067},[4283],{"type":998,"value":4098},{"type":993,"tag":1026,"props":4285,"children":4286},{"style":1053},[4287],{"type":998,"value":3091},{"type":993,"tag":1026,"props":4289,"children":4290},{"style":1139},[4291],{"type":998,"value":4292},"\"Email must contain @\"\n",{"type":993,"tag":1026,"props":4294,"children":4295},{"class":1028,"line":164},[4296,4300,4305,4309,4313,4318,4323,4328,4332],{"type":993,"tag":1026,"props":4297,"children":4298},{"style":1041},[4299],{"type":998,"value":2454},{"type":993,"tag":1026,"props":4301,"children":4302},{"style":1139},[4303],{"type":998,"value":4304}," \".\"",{"type":993,"tag":1026,"props":4306,"children":4307},{"style":1041},[4308],{"type":998,"value":4081},{"type":993,"tag":1026,"props":4310,"children":4311},{"style":1041},[4312],{"type":998,"value":4268},{"type":993,"tag":1026,"props":4314,"children":4315},{"style":1053},[4316],{"type":998,"value":4317}," data.split(",{"type":993,"tag":1026,"props":4319,"children":4320},{"style":1139},[4321],{"type":998,"value":4322},"\"@\"",{"type":993,"tag":1026,"props":4324,"children":4325},{"style":1053},[4326],{"type":998,"value":4327},")[",{"type":993,"tag":1026,"props":4329,"children":4330},{"style":1067},[4331],{"type":998,"value":2987},{"type":993,"tag":1026,"props":4333,"children":4334},{"style":1053},[4335],{"type":998,"value":4336},"]:\n",{"type":993,"tag":1026,"props":4338,"children":4339},{"class":1028,"line":173},[4340,4344,4348,4352],{"type":993,"tag":1026,"props":4341,"children":4342},{"style":1041},[4343],{"type":998,"value":2481},{"type":993,"tag":1026,"props":4345,"children":4346},{"style":1067},[4347],{"type":998,"value":4098},{"type":993,"tag":1026,"props":4349,"children":4350},{"style":1053},[4351],{"type":998,"value":3091},{"type":993,"tag":1026,"props":4353,"children":4354},{"style":1139},[4355],{"type":998,"value":4356},"\"Email domain must contain .\"\n",{"type":993,"tag":1026,"props":4358,"children":4359},{"class":1028,"line":182},[4360],{"type":993,"tag":1026,"props":4361,"children":4362},{"style":1053},[4363],{"type":998,"value":3616},{"type":993,"tag":1026,"props":4365,"children":4366},{"class":1028,"line":191},[4367,4371,4375,4379],{"type":993,"tag":1026,"props":4368,"children":4369},{"style":1041},[4370],{"type":998,"value":1131},{"type":993,"tag":1026,"props":4372,"children":4373},{"style":1067},[4374],{"type":998,"value":4119},{"type":993,"tag":1026,"props":4376,"children":4377},{"style":1053},[4378],{"type":998,"value":3091},{"type":993,"tag":1026,"props":4380,"children":4381},{"style":1139},[4382],{"type":998,"value":4383},"\"Valid email\"\n",{"type":993,"tag":1026,"props":4385,"children":4386},{"class":1028,"line":201},[4387],{"type":993,"tag":1026,"props":4388,"children":4389},{"emptyLinePlaceholder":13},[4390],{"type":998,"value":1224},{"type":993,"tag":1026,"props":4392,"children":4393},{"class":1028,"line":210},[4394,4398,4403,4407,4412],{"type":993,"tag":1026,"props":4395,"children":4396},{"style":1041},[4397],{"type":998,"value":1044},{"type":993,"tag":1026,"props":4399,"children":4400},{"style":1047},[4401],{"type":998,"value":4402}," StrictEmailValidator",{"type":993,"tag":1026,"props":4404,"children":4405},{"style":1053},[4406],{"type":998,"value":1241},{"type":993,"tag":1026,"props":4408,"children":4409},{"style":1047},[4410],{"type":998,"value":4411},"EmailValidator",{"type":993,"tag":1026,"props":4413,"children":4414},{"style":1053},[4415],{"type":998,"value":1251},{"type":993,"tag":1026,"props":4417,"children":4418},{"class":1028,"line":219},[4419,4423,4427],{"type":993,"tag":1026,"props":4420,"children":4421},{"style":1041},[4422],{"type":998,"value":1064},{"type":993,"tag":1026,"props":4424,"children":4425},{"style":1067},[4426],{"type":998,"value":1070},{"type":993,"tag":1026,"props":4428,"children":4429},{"style":1053},[4430],{"type":998,"value":4431},"(self, allowed_domains):\n",{"type":993,"tag":1026,"props":4433,"children":4434},{"class":1028,"line":228},[4435,4439,4444,4448],{"type":993,"tag":1026,"props":4436,"children":4437},{"style":1067},[4438],{"type":998,"value":1083},{"type":993,"tag":1026,"props":4440,"children":4441},{"style":1053},[4442],{"type":998,"value":4443},".allowed_domains ",{"type":993,"tag":1026,"props":4445,"children":4446},{"style":1041},[4447],{"type":998,"value":1093},{"type":993,"tag":1026,"props":4449,"children":4450},{"style":1053},[4451],{"type":998,"value":4452}," allowed_domains\n",{"type":993,"tag":1026,"props":4454,"children":4455},{"class":1028,"line":238},[4456],{"type":993,"tag":1026,"props":4457,"children":4458},{"style":1053},[4459],{"type":998,"value":1106},{"type":993,"tag":1026,"props":4461,"children":4462},{"class":1028,"line":247},[4463,4467,4471],{"type":993,"tag":1026,"props":4464,"children":4465},{"style":1041},[4466],{"type":998,"value":1064},{"type":993,"tag":1026,"props":4468,"children":4469},{"style":1047},[4470],{"type":998,"value":4064},{"type":993,"tag":1026,"props":4472,"children":4473},{"style":1053},[4474],{"type":998,"value":4069},{"type":993,"tag":1026,"props":4476,"children":4477},{"class":1028,"line":256},[4478],{"type":993,"tag":1026,"props":4479,"children":4480},{"style":1032},[4481],{"type":998,"value":4482},"        # Call parent validation first\n",{"type":993,"tag":1026,"props":4484,"children":4485},{"class":1028,"line":265},[4486,4490,4494,4498],{"type":993,"tag":1026,"props":4487,"children":4488},{"style":1053},[4489],{"type":998,"value":4191},{"type":993,"tag":1026,"props":4491,"children":4492},{"style":1041},[4493],{"type":998,"value":1093},{"type":993,"tag":1026,"props":4495,"children":4496},{"style":1067},[4497],{"type":998,"value":3636},{"type":993,"tag":1026,"props":4499,"children":4500},{"style":1053},[4501],{"type":998,"value":4204},{"type":993,"tag":1026,"props":4503,"children":4504},{"class":1028,"line":274},[4505,4509,4513],{"type":993,"tag":1026,"props":4506,"children":4507},{"style":1041},[4508],{"type":998,"value":2454},{"type":993,"tag":1026,"props":4510,"children":4511},{"style":1041},[4512],{"type":998,"value":4081},{"type":993,"tag":1026,"props":4514,"children":4515},{"style":1053},[4516],{"type":998,"value":4220},{"type":993,"tag":1026,"props":4518,"children":4519},{"class":1028,"line":284},[4520,4524],{"type":993,"tag":1026,"props":4521,"children":4522},{"style":1041},[4523],{"type":998,"value":2481},{"type":993,"tag":1026,"props":4525,"children":4526},{"style":1053},[4527],{"type":998,"value":4232},{"type":993,"tag":1026,"props":4529,"children":4530},{"class":1028,"line":293},[4531],{"type":993,"tag":1026,"props":4532,"children":4533},{"style":1053},[4534],{"type":998,"value":3616},{"type":993,"tag":1026,"props":4536,"children":4537},{"class":1028,"line":302},[4538],{"type":993,"tag":1026,"props":4539,"children":4540},{"style":1032},[4541],{"type":998,"value":4542},"        # Add domain restriction\n",{"type":993,"tag":1026,"props":4544,"children":4545},{"class":1028,"line":311},[4546,4551,4555,4559,4563,4567,4571],{"type":993,"tag":1026,"props":4547,"children":4548},{"style":1053},[4549],{"type":998,"value":4550},"        domain ",{"type":993,"tag":1026,"props":4552,"children":4553},{"style":1041},[4554],{"type":998,"value":1093},{"type":993,"tag":1026,"props":4556,"children":4557},{"style":1053},[4558],{"type":998,"value":4317},{"type":993,"tag":1026,"props":4560,"children":4561},{"style":1139},[4562],{"type":998,"value":4322},{"type":993,"tag":1026,"props":4564,"children":4565},{"style":1053},[4566],{"type":998,"value":4327},{"type":993,"tag":1026,"props":4568,"children":4569},{"style":1067},[4570],{"type":998,"value":2987},{"type":993,"tag":1026,"props":4572,"children":4573},{"style":1053},[4574],{"type":998,"value":2938},{"type":993,"tag":1026,"props":4576,"children":4577},{"class":1028,"line":320},[4578,4582,4587,4592,4596,4600],{"type":993,"tag":1026,"props":4579,"children":4580},{"style":1041},[4581],{"type":998,"value":2454},{"type":993,"tag":1026,"props":4583,"children":4584},{"style":1053},[4585],{"type":998,"value":4586}," domain ",{"type":993,"tag":1026,"props":4588,"children":4589},{"style":1041},[4590],{"type":998,"value":4591},"not",{"type":993,"tag":1026,"props":4593,"children":4594},{"style":1041},[4595],{"type":998,"value":4268},{"type":993,"tag":1026,"props":4597,"children":4598},{"style":1067},[4599],{"type":998,"value":1197},{"type":993,"tag":1026,"props":4601,"children":4602},{"style":1053},[4603],{"type":998,"value":4604},".allowed_domains:\n",{"type":993,"tag":1026,"props":4606,"children":4607},{"class":1028,"line":329},[4608,4612,4616,4620,4624,4629,4633,4638,4642],{"type":993,"tag":1026,"props":4609,"children":4610},{"style":1041},[4611],{"type":998,"value":2481},{"type":993,"tag":1026,"props":4613,"children":4614},{"style":1067},[4615],{"type":998,"value":4098},{"type":993,"tag":1026,"props":4617,"children":4618},{"style":1053},[4619],{"type":998,"value":3091},{"type":993,"tag":1026,"props":4621,"children":4622},{"style":1041},[4623],{"type":998,"value":1615},{"type":993,"tag":1026,"props":4625,"children":4626},{"style":1139},[4627],{"type":998,"value":4628},"\"Domain ",{"type":993,"tag":1026,"props":4630,"children":4631},{"style":1067},[4632],{"type":998,"value":1625},{"type":993,"tag":1026,"props":4634,"children":4635},{"style":1053},[4636],{"type":998,"value":4637},"domain",{"type":993,"tag":1026,"props":4639,"children":4640},{"style":1067},[4641],{"type":998,"value":1157},{"type":993,"tag":1026,"props":4643,"children":4644},{"style":1139},[4645],{"type":998,"value":4646}," not allowed\"\n",{"type":993,"tag":1026,"props":4648,"children":4649},{"class":1028,"line":338},[4650],{"type":993,"tag":1026,"props":4651,"children":4652},{"style":1053},[4653],{"type":998,"value":3616},{"type":993,"tag":1026,"props":4655,"children":4656},{"class":1028,"line":347},[4657,4661,4665,4669],{"type":993,"tag":1026,"props":4658,"children":4659},{"style":1041},[4660],{"type":998,"value":1131},{"type":993,"tag":1026,"props":4662,"children":4663},{"style":1067},[4664],{"type":998,"value":4119},{"type":993,"tag":1026,"props":4666,"children":4667},{"style":1053},[4668],{"type":998,"value":3091},{"type":993,"tag":1026,"props":4670,"children":4671},{"style":1139},[4672],{"type":998,"value":4673},"\"Valid email from approved domain\"\n",{"type":993,"tag":1026,"props":4675,"children":4676},{"class":1028,"line":356},[4677],{"type":993,"tag":1026,"props":4678,"children":4679},{"emptyLinePlaceholder":13},[4680],{"type":998,"value":1224},{"type":993,"tag":1026,"props":4682,"children":4683},{"class":1028,"line":365},[4684],{"type":993,"tag":1026,"props":4685,"children":4686},{"style":1032},[4687],{"type":998,"value":4688},"# Layered validation\n",{"type":993,"tag":1026,"props":4690,"children":4691},{"class":1028,"line":374},[4692,4697,4701],{"type":993,"tag":1026,"props":4693,"children":4694},{"style":1053},[4695],{"type":998,"value":4696},"basic ",{"type":993,"tag":1026,"props":4698,"children":4699},{"style":1041},[4700],{"type":998,"value":1093},{"type":993,"tag":1026,"props":4702,"children":4703},{"style":1053},[4704],{"type":998,"value":4705}," Validator()\n",{"type":993,"tag":1026,"props":4707,"children":4708},{"class":1028,"line":384},[4709,4714,4718],{"type":993,"tag":1026,"props":4710,"children":4711},{"style":1053},[4712],{"type":998,"value":4713},"email ",{"type":993,"tag":1026,"props":4715,"children":4716},{"style":1041},[4717],{"type":998,"value":1093},{"type":993,"tag":1026,"props":4719,"children":4720},{"style":1053},[4721],{"type":998,"value":4722}," EmailValidator()\n",{"type":993,"tag":1026,"props":4724,"children":4725},{"class":1028,"line":393},[4726,4731,4735,4740,4745,4749,4754],{"type":993,"tag":1026,"props":4727,"children":4728},{"style":1053},[4729],{"type":998,"value":4730},"strict ",{"type":993,"tag":1026,"props":4732,"children":4733},{"style":1041},[4734],{"type":998,"value":1093},{"type":993,"tag":1026,"props":4736,"children":4737},{"style":1053},[4738],{"type":998,"value":4739}," StrictEmailValidator([",{"type":993,"tag":1026,"props":4741,"children":4742},{"style":1139},[4743],{"type":998,"value":4744},"\"company.com\"",{"type":993,"tag":1026,"props":4746,"children":4747},{"style":1053},[4748],{"type":998,"value":3091},{"type":993,"tag":1026,"props":4750,"children":4751},{"style":1139},[4752],{"type":998,"value":4753},"\"partner.org\"",{"type":993,"tag":1026,"props":4755,"children":4756},{"style":1053},[4757],{"type":998,"value":4758},"])\n",{"type":993,"tag":1026,"props":4760,"children":4761},{"class":1028,"line":402},[4762],{"type":993,"tag":1026,"props":4763,"children":4764},{"emptyLinePlaceholder":13},[4765],{"type":998,"value":1224},{"type":993,"tag":1026,"props":4767,"children":4768},{"class":1028,"line":411},[4769,4774,4778,4783,4788,4792,4797,4801,4806,4810,4815],{"type":993,"tag":1026,"props":4770,"children":4771},{"style":1053},[4772],{"type":998,"value":4773},"test_data ",{"type":993,"tag":1026,"props":4775,"children":4776},{"style":1041},[4777],{"type":998,"value":1093},{"type":993,"tag":1026,"props":4779,"children":4780},{"style":1053},[4781],{"type":998,"value":4782}," [",{"type":993,"tag":1026,"props":4784,"children":4785},{"style":1139},[4786],{"type":998,"value":4787},"\"\"",{"type":993,"tag":1026,"props":4789,"children":4790},{"style":1053},[4791],{"type":998,"value":3091},{"type":993,"tag":1026,"props":4793,"children":4794},{"style":1139},[4795],{"type":998,"value":4796},"\"invalid\"",{"type":993,"tag":1026,"props":4798,"children":4799},{"style":1053},[4800],{"type":998,"value":3091},{"type":993,"tag":1026,"props":4802,"children":4803},{"style":1139},[4804],{"type":998,"value":4805},"\"test@example.com\"",{"type":993,"tag":1026,"props":4807,"children":4808},{"style":1053},[4809],{"type":998,"value":3091},{"type":993,"tag":1026,"props":4811,"children":4812},{"style":1139},[4813],{"type":998,"value":4814},"\"user@company.com\"",{"type":993,"tag":1026,"props":4816,"children":4817},{"style":1053},[4818],{"type":998,"value":2938},{"type":993,"tag":1026,"props":4820,"children":4821},{"class":1028,"line":420},[4822],{"type":993,"tag":1026,"props":4823,"children":4824},{"emptyLinePlaceholder":13},[4825],{"type":998,"value":1224},{"type":993,"tag":1026,"props":4827,"children":4828},{"class":1028,"line":429},[4829,4834,4839,4843],{"type":993,"tag":1026,"props":4830,"children":4831},{"style":1041},[4832],{"type":998,"value":4833},"for",{"type":993,"tag":1026,"props":4835,"children":4836},{"style":1053},[4837],{"type":998,"value":4838}," data ",{"type":993,"tag":1026,"props":4840,"children":4841},{"style":1041},[4842],{"type":998,"value":2973},{"type":993,"tag":1026,"props":4844,"children":4845},{"style":1053},[4846],{"type":998,"value":4847}," test_data:\n",{"type":993,"tag":1026,"props":4849,"children":4850},{"class":1028,"line":438},[4851,4856,4860,4864,4869,4873,4878,4882,4887],{"type":993,"tag":1026,"props":4852,"children":4853},{"style":1067},[4854],{"type":998,"value":4855},"    print",{"type":993,"tag":1026,"props":4857,"children":4858},{"style":1053},[4859],{"type":998,"value":1241},{"type":993,"tag":1026,"props":4861,"children":4862},{"style":1041},[4863],{"type":998,"value":1615},{"type":993,"tag":1026,"props":4865,"children":4866},{"style":1139},[4867],{"type":998,"value":4868},"\"Data: '",{"type":993,"tag":1026,"props":4870,"children":4871},{"style":1067},[4872],{"type":998,"value":1625},{"type":993,"tag":1026,"props":4874,"children":4875},{"style":1053},[4876],{"type":998,"value":4877},"data",{"type":993,"tag":1026,"props":4879,"children":4880},{"style":1067},[4881],{"type":998,"value":1157},{"type":993,"tag":1026,"props":4883,"children":4884},{"style":1139},[4885],{"type":998,"value":4886},"'\"",{"type":993,"tag":1026,"props":4888,"children":4889},{"style":1053},[4890],{"type":998,"value":1549},{"type":993,"tag":1026,"props":4892,"children":4893},{"class":1028,"line":447},[4894,4898,4902,4906,4911,4915,4920,4924,4928],{"type":993,"tag":1026,"props":4895,"children":4896},{"style":1067},[4897],{"type":998,"value":4855},{"type":993,"tag":1026,"props":4899,"children":4900},{"style":1053},[4901],{"type":998,"value":1241},{"type":993,"tag":1026,"props":4903,"children":4904},{"style":1041},[4905],{"type":998,"value":1615},{"type":993,"tag":1026,"props":4907,"children":4908},{"style":1139},[4909],{"type":998,"value":4910},"\"  Basic: ",{"type":993,"tag":1026,"props":4912,"children":4913},{"style":1067},[4914],{"type":998,"value":1625},{"type":993,"tag":1026,"props":4916,"children":4917},{"style":1053},[4918],{"type":998,"value":4919},"basic.validate(data)",{"type":993,"tag":1026,"props":4921,"children":4922},{"style":1067},[4923],{"type":998,"value":1157},{"type":993,"tag":1026,"props":4925,"children":4926},{"style":1139},[4927],{"type":998,"value":1639},{"type":993,"tag":1026,"props":4929,"children":4930},{"style":1053},[4931],{"type":998,"value":1549},{"type":993,"tag":1026,"props":4933,"children":4934},{"class":1028,"line":457},[4935,4939,4943,4947,4952,4956,4961,4965,4969],{"type":993,"tag":1026,"props":4936,"children":4937},{"style":1067},[4938],{"type":998,"value":4855},{"type":993,"tag":1026,"props":4940,"children":4941},{"style":1053},[4942],{"type":998,"value":1241},{"type":993,"tag":1026,"props":4944,"children":4945},{"style":1041},[4946],{"type":998,"value":1615},{"type":993,"tag":1026,"props":4948,"children":4949},{"style":1139},[4950],{"type":998,"value":4951},"\"  Email: ",{"type":993,"tag":1026,"props":4953,"children":4954},{"style":1067},[4955],{"type":998,"value":1625},{"type":993,"tag":1026,"props":4957,"children":4958},{"style":1053},[4959],{"type":998,"value":4960},"email.validate(data)",{"type":993,"tag":1026,"props":4962,"children":4963},{"style":1067},[4964],{"type":998,"value":1157},{"type":993,"tag":1026,"props":4966,"children":4967},{"style":1139},[4968],{"type":998,"value":1639},{"type":993,"tag":1026,"props":4970,"children":4971},{"style":1053},[4972],{"type":998,"value":1549},{"type":993,"tag":1026,"props":4974,"children":4975},{"class":1028,"line":466},[4976,4980,4984,4988,4993,4997,5002,5006,5010],{"type":993,"tag":1026,"props":4977,"children":4978},{"style":1067},[4979],{"type":998,"value":4855},{"type":993,"tag":1026,"props":4981,"children":4982},{"style":1053},[4983],{"type":998,"value":1241},{"type":993,"tag":1026,"props":4985,"children":4986},{"style":1041},[4987],{"type":998,"value":1615},{"type":993,"tag":1026,"props":4989,"children":4990},{"style":1139},[4991],{"type":998,"value":4992},"\"  Strict: ",{"type":993,"tag":1026,"props":4994,"children":4995},{"style":1067},[4996],{"type":998,"value":1625},{"type":993,"tag":1026,"props":4998,"children":4999},{"style":1053},[5000],{"type":998,"value":5001},"strict.validate(data)",{"type":993,"tag":1026,"props":5003,"children":5004},{"style":1067},[5005],{"type":998,"value":1157},{"type":993,"tag":1026,"props":5007,"children":5008},{"style":1139},[5009],{"type":998,"value":1639},{"type":993,"tag":1026,"props":5011,"children":5012},{"style":1053},[5013],{"type":998,"value":1549},{"type":993,"tag":1707,"props":5015,"children":5017},{"id":5016},"polymorphism-through-overriding",[5018],{"type":998,"value":5019},"🚀 Polymorphism Through Overriding",{"type":993,"tag":1001,"props":5021,"children":5022},{},[5023],{"type":998,"value":5024},"Method overriding enables polymorphism - the ability to use different classes interchangeably through a common interface.",{"type":993,"tag":1837,"props":5026,"children":5028},{"id":5027},"polymorphic-behavior",[5029],{"type":998,"value":5030},"Polymorphic Behavior",{"type":993,"tag":1001,"props":5032,"children":5033},{},[5034],{"type":998,"value":5035},"Different classes can respond to the same method call with their own specialized behavior.",{"type":993,"tag":1012,"props":5037,"children":5038},{},[5039],{"type":993,"tag":1016,"props":5040,"children":5042},{"className":1018,"code":5041,"language":6,"meta":8,"style":8},"class MediaPlayer:\n    def __init__(self, filename):\n        self.filename = filename\n    \n    def play(self):\n        return f\"Playing {self.filename}\"\n    \n    def stop(self):\n        return f\"Stopping {self.filename}\"\n\nclass AudioPlayer(MediaPlayer):\n    def play(self):\n        return f\"🎵 Playing audio: {self.filename}\"\n    \n    def adjust_volume(self, level):\n        return f\"Volume set to {level}%\"\n\nclass VideoPlayer(MediaPlayer):\n    def play(self):\n        return f\"🎬 Playing video: {self.filename}\"\n    \n    def set_quality(self, quality):\n        return f\"Quality set to {quality}\"\n\nclass StreamPlayer(MediaPlayer):\n    def play(self):\n        return f\"📡 Streaming: {self.filename}\"\n    \n    def check_connection(self):\n        return \"Connection stable\"\n\n# Polymorphic usage - same interface, different behaviors\nplayers = [\n    AudioPlayer(\"song.mp3\"),\n    VideoPlayer(\"movie.mp4\"),\n    StreamPlayer(\"live_stream\")\n]\n\nfor player in players:\n    print(player.play())  # Each player type responds differently\n    print(player.stop())  # Inherited method works for all\n",[5043],{"type":993,"tag":1022,"props":5044,"children":5045},{"__ignoreMap":8},[5046,5062,5078,5097,5104,5120,5152,5159,5175,5207,5214,5239,5254,5286,5293,5310,5344,5351,5375,5390,5422,5429,5446,5479,5486,5510,5525,5557,5564,5580,5592,5599,5607,5624,5642,5659,5676,5683,5690,5711,5728],{"type":993,"tag":1026,"props":5047,"children":5048},{"class":1028,"line":12},[5049,5053,5058],{"type":993,"tag":1026,"props":5050,"children":5051},{"style":1041},[5052],{"type":998,"value":1044},{"type":993,"tag":1026,"props":5054,"children":5055},{"style":1047},[5056],{"type":998,"value":5057}," MediaPlayer",{"type":993,"tag":1026,"props":5059,"children":5060},{"style":1053},[5061],{"type":998,"value":1056},{"type":993,"tag":1026,"props":5063,"children":5064},{"class":1028,"line":27},[5065,5069,5073],{"type":993,"tag":1026,"props":5066,"children":5067},{"style":1041},[5068],{"type":998,"value":1064},{"type":993,"tag":1026,"props":5070,"children":5071},{"style":1067},[5072],{"type":998,"value":1070},{"type":993,"tag":1026,"props":5074,"children":5075},{"style":1053},[5076],{"type":998,"value":5077},"(self, filename):\n",{"type":993,"tag":1026,"props":5079,"children":5080},{"class":1028,"line":36},[5081,5085,5089,5093],{"type":993,"tag":1026,"props":5082,"children":5083},{"style":1067},[5084],{"type":998,"value":1083},{"type":993,"tag":1026,"props":5086,"children":5087},{"style":1053},[5088],{"type":998,"value":3724},{"type":993,"tag":1026,"props":5090,"children":5091},{"style":1041},[5092],{"type":998,"value":1093},{"type":993,"tag":1026,"props":5094,"children":5095},{"style":1053},[5096],{"type":998,"value":3733},{"type":993,"tag":1026,"props":5098,"children":5099},{"class":1028,"line":45},[5100],{"type":993,"tag":1026,"props":5101,"children":5102},{"style":1053},[5103],{"type":998,"value":1106},{"type":993,"tag":1026,"props":5105,"children":5106},{"class":1028,"line":54},[5107,5111,5116],{"type":993,"tag":1026,"props":5108,"children":5109},{"style":1041},[5110],{"type":998,"value":1064},{"type":993,"tag":1026,"props":5112,"children":5113},{"style":1047},[5114],{"type":998,"value":5115}," play",{"type":993,"tag":1026,"props":5117,"children":5118},{"style":1053},[5119],{"type":998,"value":1123},{"type":993,"tag":1026,"props":5121,"children":5122},{"class":1028,"line":63},[5123,5127,5131,5136,5140,5144,5148],{"type":993,"tag":1026,"props":5124,"children":5125},{"style":1041},[5126],{"type":998,"value":1131},{"type":993,"tag":1026,"props":5128,"children":5129},{"style":1041},[5130],{"type":998,"value":1136},{"type":993,"tag":1026,"props":5132,"children":5133},{"style":1139},[5134],{"type":998,"value":5135},"\"Playing ",{"type":993,"tag":1026,"props":5137,"children":5138},{"style":1067},[5139],{"type":998,"value":1147},{"type":993,"tag":1026,"props":5141,"children":5142},{"style":1053},[5143],{"type":998,"value":3827},{"type":993,"tag":1026,"props":5145,"children":5146},{"style":1067},[5147],{"type":998,"value":1157},{"type":993,"tag":1026,"props":5149,"children":5150},{"style":1139},[5151],{"type":998,"value":1967},{"type":993,"tag":1026,"props":5153,"children":5154},{"class":1028,"line":72},[5155],{"type":993,"tag":1026,"props":5156,"children":5157},{"style":1053},[5158],{"type":998,"value":1106},{"type":993,"tag":1026,"props":5160,"children":5161},{"class":1028,"line":81},[5162,5166,5171],{"type":993,"tag":1026,"props":5163,"children":5164},{"style":1041},[5165],{"type":998,"value":1064},{"type":993,"tag":1026,"props":5167,"children":5168},{"style":1047},[5169],{"type":998,"value":5170}," stop",{"type":993,"tag":1026,"props":5172,"children":5173},{"style":1053},[5174],{"type":998,"value":1123},{"type":993,"tag":1026,"props":5176,"children":5177},{"class":1028,"line":91},[5178,5182,5186,5191,5195,5199,5203],{"type":993,"tag":1026,"props":5179,"children":5180},{"style":1041},[5181],{"type":998,"value":1131},{"type":993,"tag":1026,"props":5183,"children":5184},{"style":1041},[5185],{"type":998,"value":1136},{"type":993,"tag":1026,"props":5187,"children":5188},{"style":1139},[5189],{"type":998,"value":5190},"\"Stopping ",{"type":993,"tag":1026,"props":5192,"children":5193},{"style":1067},[5194],{"type":998,"value":1147},{"type":993,"tag":1026,"props":5196,"children":5197},{"style":1053},[5198],{"type":998,"value":3827},{"type":993,"tag":1026,"props":5200,"children":5201},{"style":1067},[5202],{"type":998,"value":1157},{"type":993,"tag":1026,"props":5204,"children":5205},{"style":1139},[5206],{"type":998,"value":1967},{"type":993,"tag":1026,"props":5208,"children":5209},{"class":1028,"line":100},[5210],{"type":993,"tag":1026,"props":5211,"children":5212},{"emptyLinePlaceholder":13},[5213],{"type":998,"value":1224},{"type":993,"tag":1026,"props":5215,"children":5216},{"class":1028,"line":109},[5217,5221,5226,5230,5235],{"type":993,"tag":1026,"props":5218,"children":5219},{"style":1041},[5220],{"type":998,"value":1044},{"type":993,"tag":1026,"props":5222,"children":5223},{"style":1047},[5224],{"type":998,"value":5225}," AudioPlayer",{"type":993,"tag":1026,"props":5227,"children":5228},{"style":1053},[5229],{"type":998,"value":1241},{"type":993,"tag":1026,"props":5231,"children":5232},{"style":1047},[5233],{"type":998,"value":5234},"MediaPlayer",{"type":993,"tag":1026,"props":5236,"children":5237},{"style":1053},[5238],{"type":998,"value":1251},{"type":993,"tag":1026,"props":5240,"children":5241},{"class":1028,"line":118},[5242,5246,5250],{"type":993,"tag":1026,"props":5243,"children":5244},{"style":1041},[5245],{"type":998,"value":1064},{"type":993,"tag":1026,"props":5247,"children":5248},{"style":1047},[5249],{"type":998,"value":5115},{"type":993,"tag":1026,"props":5251,"children":5252},{"style":1053},[5253],{"type":998,"value":1123},{"type":993,"tag":1026,"props":5255,"children":5256},{"class":1028,"line":127},[5257,5261,5265,5270,5274,5278,5282],{"type":993,"tag":1026,"props":5258,"children":5259},{"style":1041},[5260],{"type":998,"value":1131},{"type":993,"tag":1026,"props":5262,"children":5263},{"style":1041},[5264],{"type":998,"value":1136},{"type":993,"tag":1026,"props":5266,"children":5267},{"style":1139},[5268],{"type":998,"value":5269},"\"🎵 Playing audio: ",{"type":993,"tag":1026,"props":5271,"children":5272},{"style":1067},[5273],{"type":998,"value":1147},{"type":993,"tag":1026,"props":5275,"children":5276},{"style":1053},[5277],{"type":998,"value":3827},{"type":993,"tag":1026,"props":5279,"children":5280},{"style":1067},[5281],{"type":998,"value":1157},{"type":993,"tag":1026,"props":5283,"children":5284},{"style":1139},[5285],{"type":998,"value":1967},{"type":993,"tag":1026,"props":5287,"children":5288},{"class":1028,"line":136},[5289],{"type":993,"tag":1026,"props":5290,"children":5291},{"style":1053},[5292],{"type":998,"value":1106},{"type":993,"tag":1026,"props":5294,"children":5295},{"class":1028,"line":146},[5296,5300,5305],{"type":993,"tag":1026,"props":5297,"children":5298},{"style":1041},[5299],{"type":998,"value":1064},{"type":993,"tag":1026,"props":5301,"children":5302},{"style":1047},[5303],{"type":998,"value":5304}," adjust_volume",{"type":993,"tag":1026,"props":5306,"children":5307},{"style":1053},[5308],{"type":998,"value":5309},"(self, level):\n",{"type":993,"tag":1026,"props":5311,"children":5312},{"class":1028,"line":155},[5313,5317,5321,5326,5330,5335,5339],{"type":993,"tag":1026,"props":5314,"children":5315},{"style":1041},[5316],{"type":998,"value":1131},{"type":993,"tag":1026,"props":5318,"children":5319},{"style":1041},[5320],{"type":998,"value":1136},{"type":993,"tag":1026,"props":5322,"children":5323},{"style":1139},[5324],{"type":998,"value":5325},"\"Volume set to ",{"type":993,"tag":1026,"props":5327,"children":5328},{"style":1067},[5329],{"type":998,"value":1625},{"type":993,"tag":1026,"props":5331,"children":5332},{"style":1053},[5333],{"type":998,"value":5334},"level",{"type":993,"tag":1026,"props":5336,"children":5337},{"style":1067},[5338],{"type":998,"value":1157},{"type":993,"tag":1026,"props":5340,"children":5341},{"style":1139},[5342],{"type":998,"value":5343},"%\"\n",{"type":993,"tag":1026,"props":5345,"children":5346},{"class":1028,"line":164},[5347],{"type":993,"tag":1026,"props":5348,"children":5349},{"emptyLinePlaceholder":13},[5350],{"type":998,"value":1224},{"type":993,"tag":1026,"props":5352,"children":5353},{"class":1028,"line":173},[5354,5358,5363,5367,5371],{"type":993,"tag":1026,"props":5355,"children":5356},{"style":1041},[5357],{"type":998,"value":1044},{"type":993,"tag":1026,"props":5359,"children":5360},{"style":1047},[5361],{"type":998,"value":5362}," VideoPlayer",{"type":993,"tag":1026,"props":5364,"children":5365},{"style":1053},[5366],{"type":998,"value":1241},{"type":993,"tag":1026,"props":5368,"children":5369},{"style":1047},[5370],{"type":998,"value":5234},{"type":993,"tag":1026,"props":5372,"children":5373},{"style":1053},[5374],{"type":998,"value":1251},{"type":993,"tag":1026,"props":5376,"children":5377},{"class":1028,"line":182},[5378,5382,5386],{"type":993,"tag":1026,"props":5379,"children":5380},{"style":1041},[5381],{"type":998,"value":1064},{"type":993,"tag":1026,"props":5383,"children":5384},{"style":1047},[5385],{"type":998,"value":5115},{"type":993,"tag":1026,"props":5387,"children":5388},{"style":1053},[5389],{"type":998,"value":1123},{"type":993,"tag":1026,"props":5391,"children":5392},{"class":1028,"line":191},[5393,5397,5401,5406,5410,5414,5418],{"type":993,"tag":1026,"props":5394,"children":5395},{"style":1041},[5396],{"type":998,"value":1131},{"type":993,"tag":1026,"props":5398,"children":5399},{"style":1041},[5400],{"type":998,"value":1136},{"type":993,"tag":1026,"props":5402,"children":5403},{"style":1139},[5404],{"type":998,"value":5405},"\"🎬 Playing video: ",{"type":993,"tag":1026,"props":5407,"children":5408},{"style":1067},[5409],{"type":998,"value":1147},{"type":993,"tag":1026,"props":5411,"children":5412},{"style":1053},[5413],{"type":998,"value":3827},{"type":993,"tag":1026,"props":5415,"children":5416},{"style":1067},[5417],{"type":998,"value":1157},{"type":993,"tag":1026,"props":5419,"children":5420},{"style":1139},[5421],{"type":998,"value":1967},{"type":993,"tag":1026,"props":5423,"children":5424},{"class":1028,"line":201},[5425],{"type":993,"tag":1026,"props":5426,"children":5427},{"style":1053},[5428],{"type":998,"value":1106},{"type":993,"tag":1026,"props":5430,"children":5431},{"class":1028,"line":210},[5432,5436,5441],{"type":993,"tag":1026,"props":5433,"children":5434},{"style":1041},[5435],{"type":998,"value":1064},{"type":993,"tag":1026,"props":5437,"children":5438},{"style":1047},[5439],{"type":998,"value":5440}," set_quality",{"type":993,"tag":1026,"props":5442,"children":5443},{"style":1053},[5444],{"type":998,"value":5445},"(self, quality):\n",{"type":993,"tag":1026,"props":5447,"children":5448},{"class":1028,"line":219},[5449,5453,5457,5462,5466,5471,5475],{"type":993,"tag":1026,"props":5450,"children":5451},{"style":1041},[5452],{"type":998,"value":1131},{"type":993,"tag":1026,"props":5454,"children":5455},{"style":1041},[5456],{"type":998,"value":1136},{"type":993,"tag":1026,"props":5458,"children":5459},{"style":1139},[5460],{"type":998,"value":5461},"\"Quality set to ",{"type":993,"tag":1026,"props":5463,"children":5464},{"style":1067},[5465],{"type":998,"value":1625},{"type":993,"tag":1026,"props":5467,"children":5468},{"style":1053},[5469],{"type":998,"value":5470},"quality",{"type":993,"tag":1026,"props":5472,"children":5473},{"style":1067},[5474],{"type":998,"value":1157},{"type":993,"tag":1026,"props":5476,"children":5477},{"style":1139},[5478],{"type":998,"value":1967},{"type":993,"tag":1026,"props":5480,"children":5481},{"class":1028,"line":228},[5482],{"type":993,"tag":1026,"props":5483,"children":5484},{"emptyLinePlaceholder":13},[5485],{"type":998,"value":1224},{"type":993,"tag":1026,"props":5487,"children":5488},{"class":1028,"line":238},[5489,5493,5498,5502,5506],{"type":993,"tag":1026,"props":5490,"children":5491},{"style":1041},[5492],{"type":998,"value":1044},{"type":993,"tag":1026,"props":5494,"children":5495},{"style":1047},[5496],{"type":998,"value":5497}," StreamPlayer",{"type":993,"tag":1026,"props":5499,"children":5500},{"style":1053},[5501],{"type":998,"value":1241},{"type":993,"tag":1026,"props":5503,"children":5504},{"style":1047},[5505],{"type":998,"value":5234},{"type":993,"tag":1026,"props":5507,"children":5508},{"style":1053},[5509],{"type":998,"value":1251},{"type":993,"tag":1026,"props":5511,"children":5512},{"class":1028,"line":247},[5513,5517,5521],{"type":993,"tag":1026,"props":5514,"children":5515},{"style":1041},[5516],{"type":998,"value":1064},{"type":993,"tag":1026,"props":5518,"children":5519},{"style":1047},[5520],{"type":998,"value":5115},{"type":993,"tag":1026,"props":5522,"children":5523},{"style":1053},[5524],{"type":998,"value":1123},{"type":993,"tag":1026,"props":5526,"children":5527},{"class":1028,"line":256},[5528,5532,5536,5541,5545,5549,5553],{"type":993,"tag":1026,"props":5529,"children":5530},{"style":1041},[5531],{"type":998,"value":1131},{"type":993,"tag":1026,"props":5533,"children":5534},{"style":1041},[5535],{"type":998,"value":1136},{"type":993,"tag":1026,"props":5537,"children":5538},{"style":1139},[5539],{"type":998,"value":5540},"\"📡 Streaming: ",{"type":993,"tag":1026,"props":5542,"children":5543},{"style":1067},[5544],{"type":998,"value":1147},{"type":993,"tag":1026,"props":5546,"children":5547},{"style":1053},[5548],{"type":998,"value":3827},{"type":993,"tag":1026,"props":5550,"children":5551},{"style":1067},[5552],{"type":998,"value":1157},{"type":993,"tag":1026,"props":5554,"children":5555},{"style":1139},[5556],{"type":998,"value":1967},{"type":993,"tag":1026,"props":5558,"children":5559},{"class":1028,"line":265},[5560],{"type":993,"tag":1026,"props":5561,"children":5562},{"style":1053},[5563],{"type":998,"value":1106},{"type":993,"tag":1026,"props":5565,"children":5566},{"class":1028,"line":274},[5567,5571,5576],{"type":993,"tag":1026,"props":5568,"children":5569},{"style":1041},[5570],{"type":998,"value":1064},{"type":993,"tag":1026,"props":5572,"children":5573},{"style":1047},[5574],{"type":998,"value":5575}," check_connection",{"type":993,"tag":1026,"props":5577,"children":5578},{"style":1053},[5579],{"type":998,"value":1123},{"type":993,"tag":1026,"props":5581,"children":5582},{"class":1028,"line":284},[5583,5587],{"type":993,"tag":1026,"props":5584,"children":5585},{"style":1041},[5586],{"type":998,"value":1131},{"type":993,"tag":1026,"props":5588,"children":5589},{"style":1139},[5590],{"type":998,"value":5591}," \"Connection stable\"\n",{"type":993,"tag":1026,"props":5593,"children":5594},{"class":1028,"line":293},[5595],{"type":993,"tag":1026,"props":5596,"children":5597},{"emptyLinePlaceholder":13},[5598],{"type":998,"value":1224},{"type":993,"tag":1026,"props":5600,"children":5601},{"class":1028,"line":302},[5602],{"type":993,"tag":1026,"props":5603,"children":5604},{"style":1032},[5605],{"type":998,"value":5606},"# Polymorphic usage - same interface, different behaviors\n",{"type":993,"tag":1026,"props":5608,"children":5609},{"class":1028,"line":311},[5610,5615,5619],{"type":993,"tag":1026,"props":5611,"children":5612},{"style":1053},[5613],{"type":998,"value":5614},"players ",{"type":993,"tag":1026,"props":5616,"children":5617},{"style":1041},[5618],{"type":998,"value":1093},{"type":993,"tag":1026,"props":5620,"children":5621},{"style":1053},[5622],{"type":998,"value":5623}," [\n",{"type":993,"tag":1026,"props":5625,"children":5626},{"class":1028,"line":320},[5627,5632,5637],{"type":993,"tag":1026,"props":5628,"children":5629},{"style":1053},[5630],{"type":998,"value":5631},"    AudioPlayer(",{"type":993,"tag":1026,"props":5633,"children":5634},{"style":1139},[5635],{"type":998,"value":5636},"\"song.mp3\"",{"type":993,"tag":1026,"props":5638,"children":5639},{"style":1053},[5640],{"type":998,"value":5641},"),\n",{"type":993,"tag":1026,"props":5643,"children":5644},{"class":1028,"line":329},[5645,5650,5655],{"type":993,"tag":1026,"props":5646,"children":5647},{"style":1053},[5648],{"type":998,"value":5649},"    VideoPlayer(",{"type":993,"tag":1026,"props":5651,"children":5652},{"style":1139},[5653],{"type":998,"value":5654},"\"movie.mp4\"",{"type":993,"tag":1026,"props":5656,"children":5657},{"style":1053},[5658],{"type":998,"value":5641},{"type":993,"tag":1026,"props":5660,"children":5661},{"class":1028,"line":338},[5662,5667,5672],{"type":993,"tag":1026,"props":5663,"children":5664},{"style":1053},[5665],{"type":998,"value":5666},"    StreamPlayer(",{"type":993,"tag":1026,"props":5668,"children":5669},{"style":1139},[5670],{"type":998,"value":5671},"\"live_stream\"",{"type":993,"tag":1026,"props":5673,"children":5674},{"style":1053},[5675],{"type":998,"value":1549},{"type":993,"tag":1026,"props":5677,"children":5678},{"class":1028,"line":347},[5679],{"type":993,"tag":1026,"props":5680,"children":5681},{"style":1053},[5682],{"type":998,"value":2938},{"type":993,"tag":1026,"props":5684,"children":5685},{"class":1028,"line":356},[5686],{"type":993,"tag":1026,"props":5687,"children":5688},{"emptyLinePlaceholder":13},[5689],{"type":998,"value":1224},{"type":993,"tag":1026,"props":5691,"children":5692},{"class":1028,"line":365},[5693,5697,5702,5706],{"type":993,"tag":1026,"props":5694,"children":5695},{"style":1041},[5696],{"type":998,"value":4833},{"type":993,"tag":1026,"props":5698,"children":5699},{"style":1053},[5700],{"type":998,"value":5701}," player ",{"type":993,"tag":1026,"props":5703,"children":5704},{"style":1041},[5705],{"type":998,"value":2973},{"type":993,"tag":1026,"props":5707,"children":5708},{"style":1053},[5709],{"type":998,"value":5710}," players:\n",{"type":993,"tag":1026,"props":5712,"children":5713},{"class":1028,"line":374},[5714,5718,5723],{"type":993,"tag":1026,"props":5715,"children":5716},{"style":1067},[5717],{"type":998,"value":4855},{"type":993,"tag":1026,"props":5719,"children":5720},{"style":1053},[5721],{"type":998,"value":5722},"(player.play())  ",{"type":993,"tag":1026,"props":5724,"children":5725},{"style":1032},[5726],{"type":998,"value":5727},"# Each player type responds differently\n",{"type":993,"tag":1026,"props":5729,"children":5730},{"class":1028,"line":384},[5731,5735,5740],{"type":993,"tag":1026,"props":5732,"children":5733},{"style":1067},[5734],{"type":998,"value":4855},{"type":993,"tag":1026,"props":5736,"children":5737},{"style":1053},[5738],{"type":998,"value":5739},"(player.stop())  ",{"type":993,"tag":1026,"props":5741,"children":5742},{"style":1032},[5743],{"type":998,"value":5744},"# Inherited method works for all\n",{"type":993,"tag":1707,"props":5746,"children":5748},{"id":5747},"advanced-overriding-patterns",[5749],{"type":998,"value":5750},"🌟 Advanced Overriding Patterns",{"type":993,"tag":1837,"props":5752,"children":5754},{"id":5753},"template-method-pattern",[5755],{"type":998,"value":5756},"Template Method Pattern",{"type":993,"tag":1001,"props":5758,"children":5759},{},[5760],{"type":998,"value":5761},"Define a skeleton algorithm in the parent class, allowing subclasses to override specific steps.",{"type":993,"tag":1012,"props":5763,"children":5764},{},[5765],{"type":993,"tag":1016,"props":5766,"children":5768},{"className":1018,"code":5767,"language":6,"meta":8,"style":8},"class DataExporter:\n    def export(self, data):\n        # Template method - defines the process\n        formatted_data = self.format_data(data)\n        output = self.generate_output(formatted_data)\n        result = self.save_output(output)\n        return result\n    \n    def format_data(self, data):\n        # Default implementation\n        return str(data)\n    \n    def generate_output(self, formatted_data):\n        # Must be overridden by subclasses\n        raise NotImplementedError(\"Subclasses must implement generate_output\")\n    \n    def save_output(self, output):\n        # Default implementation\n        return f\"Saved {len(output)} characters\"\n\nclass JSONExporter(DataExporter):\n    def format_data(self, data):\n        # Override to format as JSON\n        import json\n        return json.dumps(data, indent=2)\n    \n    def generate_output(self, formatted_data):\n        return f\"JSON Export:\\n{formatted_data}\"\n\nclass CSVExporter(DataExporter):\n    def format_data(self, data):\n        # Override to format as CSV\n        if isinstance(data, list) and isinstance(data[0], dict):\n            headers = \",\".join(data[0].keys())\n            rows = [\",\".join(str(item[key]) for key in item.keys()) for item in data]\n            return f\"{headers}\\n\" + \"\\n\".join(rows)\n        return str(data)\n    \n    def generate_output(self, formatted_data):\n        return f\"CSV Export:\\n{formatted_data}\"\n\n# Template pattern in action\ndata = [{\"name\": \"Alice\", \"age\": 30}, {\"name\": \"Bob\", \"age\": 25}]\n\njson_exporter = JSONExporter()\ncsv_exporter = CSVExporter()\n\nprint(json_exporter.export(data))\nprint(\"\\n\" + \"=\"*40 + \"\\n\")\nprint(csv_exporter.export(data))\n",[5769],{"type":993,"tag":1022,"props":5770,"children":5771},{"__ignoreMap":8},[5772,5788,5804,5812,5833,5854,5874,5885,5892,5908,5916,5933,5940,5957,5965,5991,5998,6015,6022,6056,6063,6088,6103,6111,6123,6153,6160,6175,6209,6216,6240,6255,6263,6322,6353,6425,6481,6496,6503,6518,6550,6557,6565,6654,6661,6678,6695,6702,6714,6775],{"type":993,"tag":1026,"props":5773,"children":5774},{"class":1028,"line":12},[5775,5779,5784],{"type":993,"tag":1026,"props":5776,"children":5777},{"style":1041},[5778],{"type":998,"value":1044},{"type":993,"tag":1026,"props":5780,"children":5781},{"style":1047},[5782],{"type":998,"value":5783}," DataExporter",{"type":993,"tag":1026,"props":5785,"children":5786},{"style":1053},[5787],{"type":998,"value":1056},{"type":993,"tag":1026,"props":5789,"children":5790},{"class":1028,"line":27},[5791,5795,5800],{"type":993,"tag":1026,"props":5792,"children":5793},{"style":1041},[5794],{"type":998,"value":1064},{"type":993,"tag":1026,"props":5796,"children":5797},{"style":1047},[5798],{"type":998,"value":5799}," export",{"type":993,"tag":1026,"props":5801,"children":5802},{"style":1053},[5803],{"type":998,"value":4069},{"type":993,"tag":1026,"props":5805,"children":5806},{"class":1028,"line":36},[5807],{"type":993,"tag":1026,"props":5808,"children":5809},{"style":1032},[5810],{"type":998,"value":5811},"        # Template method - defines the process\n",{"type":993,"tag":1026,"props":5813,"children":5814},{"class":1028,"line":45},[5815,5820,5824,5828],{"type":993,"tag":1026,"props":5816,"children":5817},{"style":1053},[5818],{"type":998,"value":5819},"        formatted_data ",{"type":993,"tag":1026,"props":5821,"children":5822},{"style":1041},[5823],{"type":998,"value":1093},{"type":993,"tag":1026,"props":5825,"children":5826},{"style":1067},[5827],{"type":998,"value":1197},{"type":993,"tag":1026,"props":5829,"children":5830},{"style":1053},[5831],{"type":998,"value":5832},".format_data(data)\n",{"type":993,"tag":1026,"props":5834,"children":5835},{"class":1028,"line":54},[5836,5841,5845,5849],{"type":993,"tag":1026,"props":5837,"children":5838},{"style":1053},[5839],{"type":998,"value":5840},"        output ",{"type":993,"tag":1026,"props":5842,"children":5843},{"style":1041},[5844],{"type":998,"value":1093},{"type":993,"tag":1026,"props":5846,"children":5847},{"style":1067},[5848],{"type":998,"value":1197},{"type":993,"tag":1026,"props":5850,"children":5851},{"style":1053},[5852],{"type":998,"value":5853},".generate_output(formatted_data)\n",{"type":993,"tag":1026,"props":5855,"children":5856},{"class":1028,"line":63},[5857,5861,5865,5869],{"type":993,"tag":1026,"props":5858,"children":5859},{"style":1053},[5860],{"type":998,"value":3771},{"type":993,"tag":1026,"props":5862,"children":5863},{"style":1041},[5864],{"type":998,"value":1093},{"type":993,"tag":1026,"props":5866,"children":5867},{"style":1067},[5868],{"type":998,"value":1197},{"type":993,"tag":1026,"props":5870,"children":5871},{"style":1053},[5872],{"type":998,"value":5873},".save_output(output)\n",{"type":993,"tag":1026,"props":5875,"children":5876},{"class":1028,"line":72},[5877,5881],{"type":993,"tag":1026,"props":5878,"children":5879},{"style":1041},[5880],{"type":998,"value":1131},{"type":993,"tag":1026,"props":5882,"children":5883},{"style":1053},[5884],{"type":998,"value":3034},{"type":993,"tag":1026,"props":5886,"children":5887},{"class":1028,"line":81},[5888],{"type":993,"tag":1026,"props":5889,"children":5890},{"style":1053},[5891],{"type":998,"value":1106},{"type":993,"tag":1026,"props":5893,"children":5894},{"class":1028,"line":91},[5895,5899,5904],{"type":993,"tag":1026,"props":5896,"children":5897},{"style":1041},[5898],{"type":998,"value":1064},{"type":993,"tag":1026,"props":5900,"children":5901},{"style":1047},[5902],{"type":998,"value":5903}," format_data",{"type":993,"tag":1026,"props":5905,"children":5906},{"style":1053},[5907],{"type":998,"value":4069},{"type":993,"tag":1026,"props":5909,"children":5910},{"class":1028,"line":100},[5911],{"type":993,"tag":1026,"props":5912,"children":5913},{"style":1032},[5914],{"type":998,"value":5915},"        # Default implementation\n",{"type":993,"tag":1026,"props":5917,"children":5918},{"class":1028,"line":109},[5919,5923,5928],{"type":993,"tag":1026,"props":5920,"children":5921},{"style":1041},[5922],{"type":998,"value":1131},{"type":993,"tag":1026,"props":5924,"children":5925},{"style":1067},[5926],{"type":998,"value":5927}," str",{"type":993,"tag":1026,"props":5929,"children":5930},{"style":1053},[5931],{"type":998,"value":5932},"(data)\n",{"type":993,"tag":1026,"props":5934,"children":5935},{"class":1028,"line":118},[5936],{"type":993,"tag":1026,"props":5937,"children":5938},{"style":1053},[5939],{"type":998,"value":1106},{"type":993,"tag":1026,"props":5941,"children":5942},{"class":1028,"line":127},[5943,5947,5952],{"type":993,"tag":1026,"props":5944,"children":5945},{"style":1041},[5946],{"type":998,"value":1064},{"type":993,"tag":1026,"props":5948,"children":5949},{"style":1047},[5950],{"type":998,"value":5951}," generate_output",{"type":993,"tag":1026,"props":5953,"children":5954},{"style":1053},[5955],{"type":998,"value":5956},"(self, formatted_data):\n",{"type":993,"tag":1026,"props":5958,"children":5959},{"class":1028,"line":136},[5960],{"type":993,"tag":1026,"props":5961,"children":5962},{"style":1032},[5963],{"type":998,"value":5964},"        # Must be overridden by subclasses\n",{"type":993,"tag":1026,"props":5966,"children":5967},{"class":1028,"line":146},[5968,5973,5978,5982,5987],{"type":993,"tag":1026,"props":5969,"children":5970},{"style":1041},[5971],{"type":998,"value":5972},"        raise",{"type":993,"tag":1026,"props":5974,"children":5975},{"style":1067},[5976],{"type":998,"value":5977}," NotImplementedError",{"type":993,"tag":1026,"props":5979,"children":5980},{"style":1053},[5981],{"type":998,"value":1241},{"type":993,"tag":1026,"props":5983,"children":5984},{"style":1139},[5985],{"type":998,"value":5986},"\"Subclasses must implement generate_output\"",{"type":993,"tag":1026,"props":5988,"children":5989},{"style":1053},[5990],{"type":998,"value":1549},{"type":993,"tag":1026,"props":5992,"children":5993},{"class":1028,"line":155},[5994],{"type":993,"tag":1026,"props":5995,"children":5996},{"style":1053},[5997],{"type":998,"value":1106},{"type":993,"tag":1026,"props":5999,"children":6000},{"class":1028,"line":164},[6001,6005,6010],{"type":993,"tag":1026,"props":6002,"children":6003},{"style":1041},[6004],{"type":998,"value":1064},{"type":993,"tag":1026,"props":6006,"children":6007},{"style":1047},[6008],{"type":998,"value":6009}," save_output",{"type":993,"tag":1026,"props":6011,"children":6012},{"style":1053},[6013],{"type":998,"value":6014},"(self, output):\n",{"type":993,"tag":1026,"props":6016,"children":6017},{"class":1028,"line":173},[6018],{"type":993,"tag":1026,"props":6019,"children":6020},{"style":1032},[6021],{"type":998,"value":5915},{"type":993,"tag":1026,"props":6023,"children":6024},{"class":1028,"line":182},[6025,6029,6033,6038,6042,6047,6051],{"type":993,"tag":1026,"props":6026,"children":6027},{"style":1041},[6028],{"type":998,"value":1131},{"type":993,"tag":1026,"props":6030,"children":6031},{"style":1041},[6032],{"type":998,"value":1136},{"type":993,"tag":1026,"props":6034,"children":6035},{"style":1139},[6036],{"type":998,"value":6037},"\"Saved ",{"type":993,"tag":1026,"props":6039,"children":6040},{"style":1067},[6041],{"type":998,"value":3998},{"type":993,"tag":1026,"props":6043,"children":6044},{"style":1053},[6045],{"type":998,"value":6046},"(output)",{"type":993,"tag":1026,"props":6048,"children":6049},{"style":1067},[6050],{"type":998,"value":1157},{"type":993,"tag":1026,"props":6052,"children":6053},{"style":1139},[6054],{"type":998,"value":6055}," characters\"\n",{"type":993,"tag":1026,"props":6057,"children":6058},{"class":1028,"line":191},[6059],{"type":993,"tag":1026,"props":6060,"children":6061},{"emptyLinePlaceholder":13},[6062],{"type":998,"value":1224},{"type":993,"tag":1026,"props":6064,"children":6065},{"class":1028,"line":201},[6066,6070,6075,6079,6084],{"type":993,"tag":1026,"props":6067,"children":6068},{"style":1041},[6069],{"type":998,"value":1044},{"type":993,"tag":1026,"props":6071,"children":6072},{"style":1047},[6073],{"type":998,"value":6074}," JSONExporter",{"type":993,"tag":1026,"props":6076,"children":6077},{"style":1053},[6078],{"type":998,"value":1241},{"type":993,"tag":1026,"props":6080,"children":6081},{"style":1047},[6082],{"type":998,"value":6083},"DataExporter",{"type":993,"tag":1026,"props":6085,"children":6086},{"style":1053},[6087],{"type":998,"value":1251},{"type":993,"tag":1026,"props":6089,"children":6090},{"class":1028,"line":210},[6091,6095,6099],{"type":993,"tag":1026,"props":6092,"children":6093},{"style":1041},[6094],{"type":998,"value":1064},{"type":993,"tag":1026,"props":6096,"children":6097},{"style":1047},[6098],{"type":998,"value":5903},{"type":993,"tag":1026,"props":6100,"children":6101},{"style":1053},[6102],{"type":998,"value":4069},{"type":993,"tag":1026,"props":6104,"children":6105},{"class":1028,"line":219},[6106],{"type":993,"tag":1026,"props":6107,"children":6108},{"style":1032},[6109],{"type":998,"value":6110},"        # Override to format as JSON\n",{"type":993,"tag":1026,"props":6112,"children":6113},{"class":1028,"line":228},[6114,6118],{"type":993,"tag":1026,"props":6115,"children":6116},{"style":1041},[6117],{"type":998,"value":3450},{"type":993,"tag":1026,"props":6119,"children":6120},{"style":1053},[6121],{"type":998,"value":6122}," json\n",{"type":993,"tag":1026,"props":6124,"children":6125},{"class":1028,"line":238},[6126,6130,6135,6141,6145,6149],{"type":993,"tag":1026,"props":6127,"children":6128},{"style":1041},[6129],{"type":998,"value":1131},{"type":993,"tag":1026,"props":6131,"children":6132},{"style":1053},[6133],{"type":998,"value":6134}," json.dumps(data, ",{"type":993,"tag":1026,"props":6136,"children":6138},{"style":6137},"--shiki-default:#E36209;--shiki-app-dark-mode:#FFAB70",[6139],{"type":998,"value":6140},"indent",{"type":993,"tag":1026,"props":6142,"children":6143},{"style":1041},[6144],{"type":998,"value":1093},{"type":993,"tag":1026,"props":6146,"children":6147},{"style":1067},[6148],{"type":998,"value":3096},{"type":993,"tag":1026,"props":6150,"children":6151},{"style":1053},[6152],{"type":998,"value":1549},{"type":993,"tag":1026,"props":6154,"children":6155},{"class":1028,"line":247},[6156],{"type":993,"tag":1026,"props":6157,"children":6158},{"style":1053},[6159],{"type":998,"value":1106},{"type":993,"tag":1026,"props":6161,"children":6162},{"class":1028,"line":256},[6163,6167,6171],{"type":993,"tag":1026,"props":6164,"children":6165},{"style":1041},[6166],{"type":998,"value":1064},{"type":993,"tag":1026,"props":6168,"children":6169},{"style":1047},[6170],{"type":998,"value":5951},{"type":993,"tag":1026,"props":6172,"children":6173},{"style":1053},[6174],{"type":998,"value":5956},{"type":993,"tag":1026,"props":6176,"children":6177},{"class":1028,"line":265},[6178,6182,6186,6191,6196,6201,6205],{"type":993,"tag":1026,"props":6179,"children":6180},{"style":1041},[6181],{"type":998,"value":1131},{"type":993,"tag":1026,"props":6183,"children":6184},{"style":1041},[6185],{"type":998,"value":1136},{"type":993,"tag":1026,"props":6187,"children":6188},{"style":1139},[6189],{"type":998,"value":6190},"\"JSON Export:",{"type":993,"tag":1026,"props":6192,"children":6193},{"style":1067},[6194],{"type":998,"value":6195},"\\n{",{"type":993,"tag":1026,"props":6197,"children":6198},{"style":1053},[6199],{"type":998,"value":6200},"formatted_data",{"type":993,"tag":1026,"props":6202,"children":6203},{"style":1067},[6204],{"type":998,"value":1157},{"type":993,"tag":1026,"props":6206,"children":6207},{"style":1139},[6208],{"type":998,"value":1967},{"type":993,"tag":1026,"props":6210,"children":6211},{"class":1028,"line":274},[6212],{"type":993,"tag":1026,"props":6213,"children":6214},{"emptyLinePlaceholder":13},[6215],{"type":998,"value":1224},{"type":993,"tag":1026,"props":6217,"children":6218},{"class":1028,"line":284},[6219,6223,6228,6232,6236],{"type":993,"tag":1026,"props":6220,"children":6221},{"style":1041},[6222],{"type":998,"value":1044},{"type":993,"tag":1026,"props":6224,"children":6225},{"style":1047},[6226],{"type":998,"value":6227}," CSVExporter",{"type":993,"tag":1026,"props":6229,"children":6230},{"style":1053},[6231],{"type":998,"value":1241},{"type":993,"tag":1026,"props":6233,"children":6234},{"style":1047},[6235],{"type":998,"value":6083},{"type":993,"tag":1026,"props":6237,"children":6238},{"style":1053},[6239],{"type":998,"value":1251},{"type":993,"tag":1026,"props":6241,"children":6242},{"class":1028,"line":293},[6243,6247,6251],{"type":993,"tag":1026,"props":6244,"children":6245},{"style":1041},[6246],{"type":998,"value":1064},{"type":993,"tag":1026,"props":6248,"children":6249},{"style":1047},[6250],{"type":998,"value":5903},{"type":993,"tag":1026,"props":6252,"children":6253},{"style":1053},[6254],{"type":998,"value":4069},{"type":993,"tag":1026,"props":6256,"children":6257},{"class":1028,"line":302},[6258],{"type":993,"tag":1026,"props":6259,"children":6260},{"style":1032},[6261],{"type":998,"value":6262},"        # Override to format as CSV\n",{"type":993,"tag":1026,"props":6264,"children":6265},{"class":1028,"line":311},[6266,6270,6275,6280,6285,6290,6295,6299,6304,6308,6313,6318],{"type":993,"tag":1026,"props":6267,"children":6268},{"style":1041},[6269],{"type":998,"value":2454},{"type":993,"tag":1026,"props":6271,"children":6272},{"style":1067},[6273],{"type":998,"value":6274}," isinstance",{"type":993,"tag":1026,"props":6276,"children":6277},{"style":1053},[6278],{"type":998,"value":6279},"(data, ",{"type":993,"tag":1026,"props":6281,"children":6282},{"style":1067},[6283],{"type":998,"value":6284},"list",{"type":993,"tag":1026,"props":6286,"children":6287},{"style":1053},[6288],{"type":998,"value":6289},") ",{"type":993,"tag":1026,"props":6291,"children":6292},{"style":1041},[6293],{"type":998,"value":6294},"and",{"type":993,"tag":1026,"props":6296,"children":6297},{"style":1067},[6298],{"type":998,"value":6274},{"type":993,"tag":1026,"props":6300,"children":6301},{"style":1053},[6302],{"type":998,"value":6303},"(data[",{"type":993,"tag":1026,"props":6305,"children":6306},{"style":1067},[6307],{"type":998,"value":2933},{"type":993,"tag":1026,"props":6309,"children":6310},{"style":1053},[6311],{"type":998,"value":6312},"], ",{"type":993,"tag":1026,"props":6314,"children":6315},{"style":1067},[6316],{"type":998,"value":6317},"dict",{"type":993,"tag":1026,"props":6319,"children":6320},{"style":1053},[6321],{"type":998,"value":1251},{"type":993,"tag":1026,"props":6323,"children":6324},{"class":1028,"line":320},[6325,6330,6334,6339,6344,6348],{"type":993,"tag":1026,"props":6326,"children":6327},{"style":1053},[6328],{"type":998,"value":6329},"            headers ",{"type":993,"tag":1026,"props":6331,"children":6332},{"style":1041},[6333],{"type":998,"value":1093},{"type":993,"tag":1026,"props":6335,"children":6336},{"style":1139},[6337],{"type":998,"value":6338}," \",\"",{"type":993,"tag":1026,"props":6340,"children":6341},{"style":1053},[6342],{"type":998,"value":6343},".join(data[",{"type":993,"tag":1026,"props":6345,"children":6346},{"style":1067},[6347],{"type":998,"value":2933},{"type":993,"tag":1026,"props":6349,"children":6350},{"style":1053},[6351],{"type":998,"value":6352},"].keys())\n",{"type":993,"tag":1026,"props":6354,"children":6355},{"class":1028,"line":329},[6356,6361,6365,6369,6374,6379,6384,6389,6393,6398,6402,6407,6411,6416,6420],{"type":993,"tag":1026,"props":6357,"children":6358},{"style":1053},[6359],{"type":998,"value":6360},"            rows ",{"type":993,"tag":1026,"props":6362,"children":6363},{"style":1041},[6364],{"type":998,"value":1093},{"type":993,"tag":1026,"props":6366,"children":6367},{"style":1053},[6368],{"type":998,"value":4782},{"type":993,"tag":1026,"props":6370,"children":6371},{"style":1139},[6372],{"type":998,"value":6373},"\",\"",{"type":993,"tag":1026,"props":6375,"children":6376},{"style":1053},[6377],{"type":998,"value":6378},".join(",{"type":993,"tag":1026,"props":6380,"children":6381},{"style":1067},[6382],{"type":998,"value":6383},"str",{"type":993,"tag":1026,"props":6385,"children":6386},{"style":1053},[6387],{"type":998,"value":6388},"(item[key]) ",{"type":993,"tag":1026,"props":6390,"children":6391},{"style":1041},[6392],{"type":998,"value":4833},{"type":993,"tag":1026,"props":6394,"children":6395},{"style":1053},[6396],{"type":998,"value":6397}," key ",{"type":993,"tag":1026,"props":6399,"children":6400},{"style":1041},[6401],{"type":998,"value":2973},{"type":993,"tag":1026,"props":6403,"children":6404},{"style":1053},[6405],{"type":998,"value":6406}," item.keys()) ",{"type":993,"tag":1026,"props":6408,"children":6409},{"style":1041},[6410],{"type":998,"value":4833},{"type":993,"tag":1026,"props":6412,"children":6413},{"style":1053},[6414],{"type":998,"value":6415}," item ",{"type":993,"tag":1026,"props":6417,"children":6418},{"style":1041},[6419],{"type":998,"value":2973},{"type":993,"tag":1026,"props":6421,"children":6422},{"style":1053},[6423],{"type":998,"value":6424}," data]\n",{"type":993,"tag":1026,"props":6426,"children":6427},{"class":1028,"line":338},[6428,6432,6436,6440,6444,6449,6454,6458,6462,6467,6472,6476],{"type":993,"tag":1026,"props":6429,"children":6430},{"style":1041},[6431],{"type":998,"value":2481},{"type":993,"tag":1026,"props":6433,"children":6434},{"style":1041},[6435],{"type":998,"value":1136},{"type":993,"tag":1026,"props":6437,"children":6438},{"style":1139},[6439],{"type":998,"value":1639},{"type":993,"tag":1026,"props":6441,"children":6442},{"style":1067},[6443],{"type":998,"value":1625},{"type":993,"tag":1026,"props":6445,"children":6446},{"style":1053},[6447],{"type":998,"value":6448},"headers",{"type":993,"tag":1026,"props":6450,"children":6451},{"style":1067},[6452],{"type":998,"value":6453},"}\\n",{"type":993,"tag":1026,"props":6455,"children":6456},{"style":1139},[6457],{"type":998,"value":1639},{"type":993,"tag":1026,"props":6459,"children":6460},{"style":1041},[6461],{"type":998,"value":1497},{"type":993,"tag":1026,"props":6463,"children":6464},{"style":1139},[6465],{"type":998,"value":6466}," \"",{"type":993,"tag":1026,"props":6468,"children":6469},{"style":1067},[6470],{"type":998,"value":6471},"\\n",{"type":993,"tag":1026,"props":6473,"children":6474},{"style":1139},[6475],{"type":998,"value":1639},{"type":993,"tag":1026,"props":6477,"children":6478},{"style":1053},[6479],{"type":998,"value":6480},".join(rows)\n",{"type":993,"tag":1026,"props":6482,"children":6483},{"class":1028,"line":347},[6484,6488,6492],{"type":993,"tag":1026,"props":6485,"children":6486},{"style":1041},[6487],{"type":998,"value":1131},{"type":993,"tag":1026,"props":6489,"children":6490},{"style":1067},[6491],{"type":998,"value":5927},{"type":993,"tag":1026,"props":6493,"children":6494},{"style":1053},[6495],{"type":998,"value":5932},{"type":993,"tag":1026,"props":6497,"children":6498},{"class":1028,"line":356},[6499],{"type":993,"tag":1026,"props":6500,"children":6501},{"style":1053},[6502],{"type":998,"value":1106},{"type":993,"tag":1026,"props":6504,"children":6505},{"class":1028,"line":365},[6506,6510,6514],{"type":993,"tag":1026,"props":6507,"children":6508},{"style":1041},[6509],{"type":998,"value":1064},{"type":993,"tag":1026,"props":6511,"children":6512},{"style":1047},[6513],{"type":998,"value":5951},{"type":993,"tag":1026,"props":6515,"children":6516},{"style":1053},[6517],{"type":998,"value":5956},{"type":993,"tag":1026,"props":6519,"children":6520},{"class":1028,"line":374},[6521,6525,6529,6534,6538,6542,6546],{"type":993,"tag":1026,"props":6522,"children":6523},{"style":1041},[6524],{"type":998,"value":1131},{"type":993,"tag":1026,"props":6526,"children":6527},{"style":1041},[6528],{"type":998,"value":1136},{"type":993,"tag":1026,"props":6530,"children":6531},{"style":1139},[6532],{"type":998,"value":6533},"\"CSV Export:",{"type":993,"tag":1026,"props":6535,"children":6536},{"style":1067},[6537],{"type":998,"value":6195},{"type":993,"tag":1026,"props":6539,"children":6540},{"style":1053},[6541],{"type":998,"value":6200},{"type":993,"tag":1026,"props":6543,"children":6544},{"style":1067},[6545],{"type":998,"value":1157},{"type":993,"tag":1026,"props":6547,"children":6548},{"style":1139},[6549],{"type":998,"value":1967},{"type":993,"tag":1026,"props":6551,"children":6552},{"class":1028,"line":384},[6553],{"type":993,"tag":1026,"props":6554,"children":6555},{"emptyLinePlaceholder":13},[6556],{"type":998,"value":1224},{"type":993,"tag":1026,"props":6558,"children":6559},{"class":1028,"line":393},[6560],{"type":993,"tag":1026,"props":6561,"children":6562},{"style":1032},[6563],{"type":998,"value":6564},"# Template pattern in action\n",{"type":993,"tag":1026,"props":6566,"children":6567},{"class":1028,"line":402},[6568,6573,6577,6582,6587,6591,6596,6600,6605,6609,6614,6619,6623,6627,6632,6636,6640,6644,6649],{"type":993,"tag":1026,"props":6569,"children":6570},{"style":1053},[6571],{"type":998,"value":6572},"data ",{"type":993,"tag":1026,"props":6574,"children":6575},{"style":1041},[6576],{"type":998,"value":1093},{"type":993,"tag":1026,"props":6578,"children":6579},{"style":1053},[6580],{"type":998,"value":6581}," [{",{"type":993,"tag":1026,"props":6583,"children":6584},{"style":1139},[6585],{"type":998,"value":6586},"\"name\"",{"type":993,"tag":1026,"props":6588,"children":6589},{"style":1053},[6590],{"type":998,"value":3836},{"type":993,"tag":1026,"props":6592,"children":6593},{"style":1139},[6594],{"type":998,"value":6595},"\"Alice\"",{"type":993,"tag":1026,"props":6597,"children":6598},{"style":1053},[6599],{"type":998,"value":3091},{"type":993,"tag":1026,"props":6601,"children":6602},{"style":1139},[6603],{"type":998,"value":6604},"\"age\"",{"type":993,"tag":1026,"props":6606,"children":6607},{"style":1053},[6608],{"type":998,"value":3836},{"type":993,"tag":1026,"props":6610,"children":6611},{"style":1067},[6612],{"type":998,"value":6613},"30",{"type":993,"tag":1026,"props":6615,"children":6616},{"style":1053},[6617],{"type":998,"value":6618},"}, {",{"type":993,"tag":1026,"props":6620,"children":6621},{"style":1139},[6622],{"type":998,"value":6586},{"type":993,"tag":1026,"props":6624,"children":6625},{"style":1053},[6626],{"type":998,"value":3836},{"type":993,"tag":1026,"props":6628,"children":6629},{"style":1139},[6630],{"type":998,"value":6631},"\"Bob\"",{"type":993,"tag":1026,"props":6633,"children":6634},{"style":1053},[6635],{"type":998,"value":3091},{"type":993,"tag":1026,"props":6637,"children":6638},{"style":1139},[6639],{"type":998,"value":6604},{"type":993,"tag":1026,"props":6641,"children":6642},{"style":1053},[6643],{"type":998,"value":3836},{"type":993,"tag":1026,"props":6645,"children":6646},{"style":1067},[6647],{"type":998,"value":6648},"25",{"type":993,"tag":1026,"props":6650,"children":6651},{"style":1053},[6652],{"type":998,"value":6653},"}]\n",{"type":993,"tag":1026,"props":6655,"children":6656},{"class":1028,"line":411},[6657],{"type":993,"tag":1026,"props":6658,"children":6659},{"emptyLinePlaceholder":13},[6660],{"type":998,"value":1224},{"type":993,"tag":1026,"props":6662,"children":6663},{"class":1028,"line":420},[6664,6669,6673],{"type":993,"tag":1026,"props":6665,"children":6666},{"style":1053},[6667],{"type":998,"value":6668},"json_exporter ",{"type":993,"tag":1026,"props":6670,"children":6671},{"style":1041},[6672],{"type":998,"value":1093},{"type":993,"tag":1026,"props":6674,"children":6675},{"style":1053},[6676],{"type":998,"value":6677}," JSONExporter()\n",{"type":993,"tag":1026,"props":6679,"children":6680},{"class":1028,"line":429},[6681,6686,6690],{"type":993,"tag":1026,"props":6682,"children":6683},{"style":1053},[6684],{"type":998,"value":6685},"csv_exporter ",{"type":993,"tag":1026,"props":6687,"children":6688},{"style":1041},[6689],{"type":998,"value":1093},{"type":993,"tag":1026,"props":6691,"children":6692},{"style":1053},[6693],{"type":998,"value":6694}," CSVExporter()\n",{"type":993,"tag":1026,"props":6696,"children":6697},{"class":1028,"line":438},[6698],{"type":993,"tag":1026,"props":6699,"children":6700},{"emptyLinePlaceholder":13},[6701],{"type":998,"value":1224},{"type":993,"tag":1026,"props":6703,"children":6704},{"class":1028,"line":447},[6705,6709],{"type":993,"tag":1026,"props":6706,"children":6707},{"style":1067},[6708],{"type":998,"value":1589},{"type":993,"tag":1026,"props":6710,"children":6711},{"style":1053},[6712],{"type":998,"value":6713},"(json_exporter.export(data))\n",{"type":993,"tag":1026,"props":6715,"children":6716},{"class":1028,"line":457},[6717,6721,6725,6729,6733,6737,6741,6746,6750,6755,6759,6763,6767,6771],{"type":993,"tag":1026,"props":6718,"children":6719},{"style":1067},[6720],{"type":998,"value":1589},{"type":993,"tag":1026,"props":6722,"children":6723},{"style":1053},[6724],{"type":998,"value":1241},{"type":993,"tag":1026,"props":6726,"children":6727},{"style":1139},[6728],{"type":998,"value":1639},{"type":993,"tag":1026,"props":6730,"children":6731},{"style":1067},[6732],{"type":998,"value":6471},{"type":993,"tag":1026,"props":6734,"children":6735},{"style":1139},[6736],{"type":998,"value":1639},{"type":993,"tag":1026,"props":6738,"children":6739},{"style":1041},[6740],{"type":998,"value":1497},{"type":993,"tag":1026,"props":6742,"children":6743},{"style":1139},[6744],{"type":998,"value":6745}," \"=\"",{"type":993,"tag":1026,"props":6747,"children":6748},{"style":1041},[6749],{"type":998,"value":1206},{"type":993,"tag":1026,"props":6751,"children":6752},{"style":1067},[6753],{"type":998,"value":6754},"40",{"type":993,"tag":1026,"props":6756,"children":6757},{"style":1041},[6758],{"type":998,"value":1497},{"type":993,"tag":1026,"props":6760,"children":6761},{"style":1139},[6762],{"type":998,"value":6466},{"type":993,"tag":1026,"props":6764,"children":6765},{"style":1067},[6766],{"type":998,"value":6471},{"type":993,"tag":1026,"props":6768,"children":6769},{"style":1139},[6770],{"type":998,"value":1639},{"type":993,"tag":1026,"props":6772,"children":6773},{"style":1053},[6774],{"type":998,"value":1549},{"type":993,"tag":1026,"props":6776,"children":6777},{"class":1028,"line":466},[6778,6782],{"type":993,"tag":1026,"props":6779,"children":6780},{"style":1067},[6781],{"type":998,"value":1589},{"type":993,"tag":1026,"props":6783,"children":6784},{"style":1053},[6785],{"type":998,"value":6786},"(csv_exporter.export(data))\n",{"type":993,"tag":1719,"props":6788,"children":6792},{"emoji":6789,"title":6790,"type":6791},"✅","Best Practices","success",[6793,6801,6824,6832,6855,6863],{"type":993,"tag":1001,"props":6794,"children":6795},{},[6796],{"type":993,"tag":1729,"props":6797,"children":6798},{},[6799],{"type":998,"value":6800},"Overriding Guidelines:",{"type":993,"tag":1735,"props":6802,"children":6803},{},[6804,6809,6814,6819],{"type":993,"tag":1739,"props":6805,"children":6806},{},[6807],{"type":998,"value":6808},"Override methods when you need different behavior",{"type":993,"tag":1739,"props":6810,"children":6811},{},[6812],{"type":998,"value":6813},"Maintain the same method signature (name, parameters)",{"type":993,"tag":1739,"props":6815,"children":6816},{},[6817],{"type":998,"value":6818},"Use super() to extend rather than replace when appropriate",{"type":993,"tag":1739,"props":6820,"children":6821},{},[6822],{"type":998,"value":6823},"Document what the overridden method does differently",{"type":993,"tag":1001,"props":6825,"children":6826},{},[6827],{"type":993,"tag":1729,"props":6828,"children":6829},{},[6830],{"type":998,"value":6831},"Design Principles:",{"type":993,"tag":1735,"props":6833,"children":6834},{},[6835,6840,6845,6850],{"type":993,"tag":1739,"props":6836,"children":6837},{},[6838],{"type":998,"value":6839},"Keep the interface consistent across related classes",{"type":993,"tag":1739,"props":6841,"children":6842},{},[6843],{"type":998,"value":6844},"Override methods that make sense for the specific class",{"type":993,"tag":1739,"props":6846,"children":6847},{},[6848],{"type":998,"value":6849},"Consider whether overriding is better than composition",{"type":993,"tag":1739,"props":6851,"children":6852},{},[6853],{"type":998,"value":6854},"Test both parent and child class behaviors",{"type":993,"tag":1001,"props":6856,"children":6857},{},[6858],{"type":993,"tag":1729,"props":6859,"children":6860},{},[6861],{"type":998,"value":6862},"Common Patterns:",{"type":993,"tag":1735,"props":6864,"children":6865},{},[6866,6871,6876,6881],{"type":993,"tag":1739,"props":6867,"children":6868},{},[6869],{"type":998,"value":6870},"Template methods for algorithms with variable steps",{"type":993,"tag":1739,"props":6872,"children":6873},{},[6874],{"type":998,"value":6875},"Factory methods for object creation",{"type":993,"tag":1739,"props":6877,"children":6878},{},[6879],{"type":998,"value":6880},"Strategy patterns for interchangeable algorithms",{"type":993,"tag":1739,"props":6882,"children":6883},{},[6884],{"type":998,"value":6885},"Polymorphic collections for uniform processing",{"type":993,"tag":6887,"props":6888,"children":6890},"content-exercise",{":widget-view":6889,"category":6,"id":711},"true",[],{"type":993,"tag":6892,"props":6893,"children":6896},"exercise",{"hint":6894,"prompt":6895},"Base Employee should have name and base_salary. FullTimeEmployee gets full salary, PartTimeEmployee gets hourly rate * hours worked","Create a simple Employee system using method overriding. Make a base Employee class with calculate_pay() method, then create FullTimeEmployee and PartTimeEmployee classes that override this method with different calculations.",[6897],{"type":993,"tag":1016,"props":6898,"children":6900},{"className":1018,"code":6899,"language":6,"meta":8,"style":8},"class Employee:\n    def __init__(self, name, base_salary):\n        # TODO: Set name and base_salary attributes\n        pass\n    \n    def calculate_pay(self):\n        # TODO: Base pay calculation (can be generic)\n        pass\n    \n    def get_info(self):\n        # TODO: Return employee information\n        pass\n\nclass FullTimeEmployee(Employee):\n    def __init__(self, name, base_salary):\n        # TODO: Call parent constructor\n        pass\n    \n    def calculate_pay(self):\n        # TODO: Override to return full salary\n        pass\n\nclass PartTimeEmployee(Employee):\n    def __init__(self, name, hourly_rate, hours_worked):\n        # TODO: Call parent constructor and set additional attributes\n        pass\n    \n    def calculate_pay(self):\n        # TODO: Override to calculate hourly pay\n        pass\n\n# TODO: Test your classes\nfull_time = FullTimeEmployee(\"Alice\", 5000)\npart_time = PartTimeEmployee(\"Bob\", 20, 25)\n\nprint(full_time.get_info())\nprint(f\"Pay: ${full_time.calculate_pay()}\")\nprint(part_time.get_info())\nprint(f\"Pay: ${part_time.calculate_pay()}\")\n",[6901],{"type":993,"tag":1022,"props":6902,"children":6903},{"__ignoreMap":8},[6904,6920,6936,6954,6962,6969,6985,7001,7008,7015,7030,7046,7053,7060,7085,7100,7116,7123,7130,7145,7161,7168,7175,7199,7215,7231,7238,7245,7260,7276,7283,7290,7307,7341,7383,7390,7402,7443,7455],{"type":993,"tag":1026,"props":6905,"children":6906},{"class":1028,"line":12},[6907,6911,6916],{"type":993,"tag":1026,"props":6908,"children":6909},{"style":1041},[6910],{"type":998,"value":1044},{"type":993,"tag":1026,"props":6912,"children":6913},{"style":1047},[6914],{"type":998,"value":6915}," Employee",{"type":993,"tag":1026,"props":6917,"children":6918},{"style":1053},[6919],{"type":998,"value":1056},{"type":993,"tag":1026,"props":6921,"children":6922},{"class":1028,"line":27},[6923,6927,6931],{"type":993,"tag":1026,"props":6924,"children":6925},{"style":1041},[6926],{"type":998,"value":1064},{"type":993,"tag":1026,"props":6928,"children":6929},{"style":1067},[6930],{"type":998,"value":1070},{"type":993,"tag":1026,"props":6932,"children":6933},{"style":1053},[6934],{"type":998,"value":6935},"(self, name, base_salary):\n",{"type":993,"tag":1026,"props":6937,"children":6938},{"class":1028,"line":36},[6939,6944,6949],{"type":993,"tag":1026,"props":6940,"children":6941},{"style":1032},[6942],{"type":998,"value":6943},"        # ",{"type":993,"tag":1026,"props":6945,"children":6946},{"style":1041},[6947],{"type":998,"value":6948},"TODO",{"type":993,"tag":1026,"props":6950,"children":6951},{"style":1032},[6952],{"type":998,"value":6953},": Set name and base_salary attributes\n",{"type":993,"tag":1026,"props":6955,"children":6956},{"class":1028,"line":45},[6957],{"type":993,"tag":1026,"props":6958,"children":6959},{"style":1041},[6960],{"type":998,"value":6961},"        pass\n",{"type":993,"tag":1026,"props":6963,"children":6964},{"class":1028,"line":54},[6965],{"type":993,"tag":1026,"props":6966,"children":6967},{"style":1053},[6968],{"type":998,"value":1106},{"type":993,"tag":1026,"props":6970,"children":6971},{"class":1028,"line":63},[6972,6976,6981],{"type":993,"tag":1026,"props":6973,"children":6974},{"style":1041},[6975],{"type":998,"value":1064},{"type":993,"tag":1026,"props":6977,"children":6978},{"style":1047},[6979],{"type":998,"value":6980}," calculate_pay",{"type":993,"tag":1026,"props":6982,"children":6983},{"style":1053},[6984],{"type":998,"value":1123},{"type":993,"tag":1026,"props":6986,"children":6987},{"class":1028,"line":72},[6988,6992,6996],{"type":993,"tag":1026,"props":6989,"children":6990},{"style":1032},[6991],{"type":998,"value":6943},{"type":993,"tag":1026,"props":6993,"children":6994},{"style":1041},[6995],{"type":998,"value":6948},{"type":993,"tag":1026,"props":6997,"children":6998},{"style":1032},[6999],{"type":998,"value":7000},": Base pay calculation (can be generic)\n",{"type":993,"tag":1026,"props":7002,"children":7003},{"class":1028,"line":81},[7004],{"type":993,"tag":1026,"props":7005,"children":7006},{"style":1041},[7007],{"type":998,"value":6961},{"type":993,"tag":1026,"props":7009,"children":7010},{"class":1028,"line":91},[7011],{"type":993,"tag":1026,"props":7012,"children":7013},{"style":1053},[7014],{"type":998,"value":1106},{"type":993,"tag":1026,"props":7016,"children":7017},{"class":1028,"line":100},[7018,7022,7026],{"type":993,"tag":1026,"props":7019,"children":7020},{"style":1041},[7021],{"type":998,"value":1064},{"type":993,"tag":1026,"props":7023,"children":7024},{"style":1047},[7025],{"type":998,"value":1986},{"type":993,"tag":1026,"props":7027,"children":7028},{"style":1053},[7029],{"type":998,"value":1123},{"type":993,"tag":1026,"props":7031,"children":7032},{"class":1028,"line":109},[7033,7037,7041],{"type":993,"tag":1026,"props":7034,"children":7035},{"style":1032},[7036],{"type":998,"value":6943},{"type":993,"tag":1026,"props":7038,"children":7039},{"style":1041},[7040],{"type":998,"value":6948},{"type":993,"tag":1026,"props":7042,"children":7043},{"style":1032},[7044],{"type":998,"value":7045},": Return employee information\n",{"type":993,"tag":1026,"props":7047,"children":7048},{"class":1028,"line":118},[7049],{"type":993,"tag":1026,"props":7050,"children":7051},{"style":1041},[7052],{"type":998,"value":6961},{"type":993,"tag":1026,"props":7054,"children":7055},{"class":1028,"line":127},[7056],{"type":993,"tag":1026,"props":7057,"children":7058},{"emptyLinePlaceholder":13},[7059],{"type":998,"value":1224},{"type":993,"tag":1026,"props":7061,"children":7062},{"class":1028,"line":136},[7063,7067,7072,7076,7081],{"type":993,"tag":1026,"props":7064,"children":7065},{"style":1041},[7066],{"type":998,"value":1044},{"type":993,"tag":1026,"props":7068,"children":7069},{"style":1047},[7070],{"type":998,"value":7071}," FullTimeEmployee",{"type":993,"tag":1026,"props":7073,"children":7074},{"style":1053},[7075],{"type":998,"value":1241},{"type":993,"tag":1026,"props":7077,"children":7078},{"style":1047},[7079],{"type":998,"value":7080},"Employee",{"type":993,"tag":1026,"props":7082,"children":7083},{"style":1053},[7084],{"type":998,"value":1251},{"type":993,"tag":1026,"props":7086,"children":7087},{"class":1028,"line":146},[7088,7092,7096],{"type":993,"tag":1026,"props":7089,"children":7090},{"style":1041},[7091],{"type":998,"value":1064},{"type":993,"tag":1026,"props":7093,"children":7094},{"style":1067},[7095],{"type":998,"value":1070},{"type":993,"tag":1026,"props":7097,"children":7098},{"style":1053},[7099],{"type":998,"value":6935},{"type":993,"tag":1026,"props":7101,"children":7102},{"class":1028,"line":155},[7103,7107,7111],{"type":993,"tag":1026,"props":7104,"children":7105},{"style":1032},[7106],{"type":998,"value":6943},{"type":993,"tag":1026,"props":7108,"children":7109},{"style":1041},[7110],{"type":998,"value":6948},{"type":993,"tag":1026,"props":7112,"children":7113},{"style":1032},[7114],{"type":998,"value":7115},": Call parent constructor\n",{"type":993,"tag":1026,"props":7117,"children":7118},{"class":1028,"line":164},[7119],{"type":993,"tag":1026,"props":7120,"children":7121},{"style":1041},[7122],{"type":998,"value":6961},{"type":993,"tag":1026,"props":7124,"children":7125},{"class":1028,"line":173},[7126],{"type":993,"tag":1026,"props":7127,"children":7128},{"style":1053},[7129],{"type":998,"value":1106},{"type":993,"tag":1026,"props":7131,"children":7132},{"class":1028,"line":182},[7133,7137,7141],{"type":993,"tag":1026,"props":7134,"children":7135},{"style":1041},[7136],{"type":998,"value":1064},{"type":993,"tag":1026,"props":7138,"children":7139},{"style":1047},[7140],{"type":998,"value":6980},{"type":993,"tag":1026,"props":7142,"children":7143},{"style":1053},[7144],{"type":998,"value":1123},{"type":993,"tag":1026,"props":7146,"children":7147},{"class":1028,"line":191},[7148,7152,7156],{"type":993,"tag":1026,"props":7149,"children":7150},{"style":1032},[7151],{"type":998,"value":6943},{"type":993,"tag":1026,"props":7153,"children":7154},{"style":1041},[7155],{"type":998,"value":6948},{"type":993,"tag":1026,"props":7157,"children":7158},{"style":1032},[7159],{"type":998,"value":7160},": Override to return full salary\n",{"type":993,"tag":1026,"props":7162,"children":7163},{"class":1028,"line":201},[7164],{"type":993,"tag":1026,"props":7165,"children":7166},{"style":1041},[7167],{"type":998,"value":6961},{"type":993,"tag":1026,"props":7169,"children":7170},{"class":1028,"line":210},[7171],{"type":993,"tag":1026,"props":7172,"children":7173},{"emptyLinePlaceholder":13},[7174],{"type":998,"value":1224},{"type":993,"tag":1026,"props":7176,"children":7177},{"class":1028,"line":219},[7178,7182,7187,7191,7195],{"type":993,"tag":1026,"props":7179,"children":7180},{"style":1041},[7181],{"type":998,"value":1044},{"type":993,"tag":1026,"props":7183,"children":7184},{"style":1047},[7185],{"type":998,"value":7186}," PartTimeEmployee",{"type":993,"tag":1026,"props":7188,"children":7189},{"style":1053},[7190],{"type":998,"value":1241},{"type":993,"tag":1026,"props":7192,"children":7193},{"style":1047},[7194],{"type":998,"value":7080},{"type":993,"tag":1026,"props":7196,"children":7197},{"style":1053},[7198],{"type":998,"value":1251},{"type":993,"tag":1026,"props":7200,"children":7201},{"class":1028,"line":228},[7202,7206,7210],{"type":993,"tag":1026,"props":7203,"children":7204},{"style":1041},[7205],{"type":998,"value":1064},{"type":993,"tag":1026,"props":7207,"children":7208},{"style":1067},[7209],{"type":998,"value":1070},{"type":993,"tag":1026,"props":7211,"children":7212},{"style":1053},[7213],{"type":998,"value":7214},"(self, name, hourly_rate, hours_worked):\n",{"type":993,"tag":1026,"props":7216,"children":7217},{"class":1028,"line":238},[7218,7222,7226],{"type":993,"tag":1026,"props":7219,"children":7220},{"style":1032},[7221],{"type":998,"value":6943},{"type":993,"tag":1026,"props":7223,"children":7224},{"style":1041},[7225],{"type":998,"value":6948},{"type":993,"tag":1026,"props":7227,"children":7228},{"style":1032},[7229],{"type":998,"value":7230},": Call parent constructor and set additional attributes\n",{"type":993,"tag":1026,"props":7232,"children":7233},{"class":1028,"line":247},[7234],{"type":993,"tag":1026,"props":7235,"children":7236},{"style":1041},[7237],{"type":998,"value":6961},{"type":993,"tag":1026,"props":7239,"children":7240},{"class":1028,"line":256},[7241],{"type":993,"tag":1026,"props":7242,"children":7243},{"style":1053},[7244],{"type":998,"value":1106},{"type":993,"tag":1026,"props":7246,"children":7247},{"class":1028,"line":265},[7248,7252,7256],{"type":993,"tag":1026,"props":7249,"children":7250},{"style":1041},[7251],{"type":998,"value":1064},{"type":993,"tag":1026,"props":7253,"children":7254},{"style":1047},[7255],{"type":998,"value":6980},{"type":993,"tag":1026,"props":7257,"children":7258},{"style":1053},[7259],{"type":998,"value":1123},{"type":993,"tag":1026,"props":7261,"children":7262},{"class":1028,"line":274},[7263,7267,7271],{"type":993,"tag":1026,"props":7264,"children":7265},{"style":1032},[7266],{"type":998,"value":6943},{"type":993,"tag":1026,"props":7268,"children":7269},{"style":1041},[7270],{"type":998,"value":6948},{"type":993,"tag":1026,"props":7272,"children":7273},{"style":1032},[7274],{"type":998,"value":7275},": Override to calculate hourly pay\n",{"type":993,"tag":1026,"props":7277,"children":7278},{"class":1028,"line":284},[7279],{"type":993,"tag":1026,"props":7280,"children":7281},{"style":1041},[7282],{"type":998,"value":6961},{"type":993,"tag":1026,"props":7284,"children":7285},{"class":1028,"line":293},[7286],{"type":993,"tag":1026,"props":7287,"children":7288},{"emptyLinePlaceholder":13},[7289],{"type":998,"value":1224},{"type":993,"tag":1026,"props":7291,"children":7292},{"class":1028,"line":302},[7293,7298,7302],{"type":993,"tag":1026,"props":7294,"children":7295},{"style":1032},[7296],{"type":998,"value":7297},"# ",{"type":993,"tag":1026,"props":7299,"children":7300},{"style":1041},[7301],{"type":998,"value":6948},{"type":993,"tag":1026,"props":7303,"children":7304},{"style":1032},[7305],{"type":998,"value":7306},": Test your classes\n",{"type":993,"tag":1026,"props":7308,"children":7309},{"class":1028,"line":311},[7310,7315,7319,7324,7328,7332,7337],{"type":993,"tag":1026,"props":7311,"children":7312},{"style":1053},[7313],{"type":998,"value":7314},"full_time ",{"type":993,"tag":1026,"props":7316,"children":7317},{"style":1041},[7318],{"type":998,"value":1093},{"type":993,"tag":1026,"props":7320,"children":7321},{"style":1053},[7322],{"type":998,"value":7323}," FullTimeEmployee(",{"type":993,"tag":1026,"props":7325,"children":7326},{"style":1139},[7327],{"type":998,"value":6595},{"type":993,"tag":1026,"props":7329,"children":7330},{"style":1053},[7331],{"type":998,"value":3091},{"type":993,"tag":1026,"props":7333,"children":7334},{"style":1067},[7335],{"type":998,"value":7336},"5000",{"type":993,"tag":1026,"props":7338,"children":7339},{"style":1053},[7340],{"type":998,"value":1549},{"type":993,"tag":1026,"props":7342,"children":7343},{"class":1028,"line":320},[7344,7349,7353,7358,7362,7366,7371,7375,7379],{"type":993,"tag":1026,"props":7345,"children":7346},{"style":1053},[7347],{"type":998,"value":7348},"part_time ",{"type":993,"tag":1026,"props":7350,"children":7351},{"style":1041},[7352],{"type":998,"value":1093},{"type":993,"tag":1026,"props":7354,"children":7355},{"style":1053},[7356],{"type":998,"value":7357}," PartTimeEmployee(",{"type":993,"tag":1026,"props":7359,"children":7360},{"style":1139},[7361],{"type":998,"value":6631},{"type":993,"tag":1026,"props":7363,"children":7364},{"style":1053},[7365],{"type":998,"value":3091},{"type":993,"tag":1026,"props":7367,"children":7368},{"style":1067},[7369],{"type":998,"value":7370},"20",{"type":993,"tag":1026,"props":7372,"children":7373},{"style":1053},[7374],{"type":998,"value":3091},{"type":993,"tag":1026,"props":7376,"children":7377},{"style":1067},[7378],{"type":998,"value":6648},{"type":993,"tag":1026,"props":7380,"children":7381},{"style":1053},[7382],{"type":998,"value":1549},{"type":993,"tag":1026,"props":7384,"children":7385},{"class":1028,"line":329},[7386],{"type":993,"tag":1026,"props":7387,"children":7388},{"emptyLinePlaceholder":13},[7389],{"type":998,"value":1224},{"type":993,"tag":1026,"props":7391,"children":7392},{"class":1028,"line":338},[7393,7397],{"type":993,"tag":1026,"props":7394,"children":7395},{"style":1067},[7396],{"type":998,"value":1589},{"type":993,"tag":1026,"props":7398,"children":7399},{"style":1053},[7400],{"type":998,"value":7401},"(full_time.get_info())\n",{"type":993,"tag":1026,"props":7403,"children":7404},{"class":1028,"line":347},[7405,7409,7413,7417,7422,7426,7431,7435,7439],{"type":993,"tag":1026,"props":7406,"children":7407},{"style":1067},[7408],{"type":998,"value":1589},{"type":993,"tag":1026,"props":7410,"children":7411},{"style":1053},[7412],{"type":998,"value":1241},{"type":993,"tag":1026,"props":7414,"children":7415},{"style":1041},[7416],{"type":998,"value":1615},{"type":993,"tag":1026,"props":7418,"children":7419},{"style":1139},[7420],{"type":998,"value":7421},"\"Pay: $",{"type":993,"tag":1026,"props":7423,"children":7424},{"style":1067},[7425],{"type":998,"value":1625},{"type":993,"tag":1026,"props":7427,"children":7428},{"style":1053},[7429],{"type":998,"value":7430},"full_time.calculate_pay()",{"type":993,"tag":1026,"props":7432,"children":7433},{"style":1067},[7434],{"type":998,"value":1157},{"type":993,"tag":1026,"props":7436,"children":7437},{"style":1139},[7438],{"type":998,"value":1639},{"type":993,"tag":1026,"props":7440,"children":7441},{"style":1053},[7442],{"type":998,"value":1549},{"type":993,"tag":1026,"props":7444,"children":7445},{"class":1028,"line":356},[7446,7450],{"type":993,"tag":1026,"props":7447,"children":7448},{"style":1067},[7449],{"type":998,"value":1589},{"type":993,"tag":1026,"props":7451,"children":7452},{"style":1053},[7453],{"type":998,"value":7454},"(part_time.get_info())\n",{"type":993,"tag":1026,"props":7456,"children":7457},{"class":1028,"line":365},[7458,7462,7466,7470,7474,7478,7483,7487,7491],{"type":993,"tag":1026,"props":7459,"children":7460},{"style":1067},[7461],{"type":998,"value":1589},{"type":993,"tag":1026,"props":7463,"children":7464},{"style":1053},[7465],{"type":998,"value":1241},{"type":993,"tag":1026,"props":7467,"children":7468},{"style":1041},[7469],{"type":998,"value":1615},{"type":993,"tag":1026,"props":7471,"children":7472},{"style":1139},[7473],{"type":998,"value":7421},{"type":993,"tag":1026,"props":7475,"children":7476},{"style":1067},[7477],{"type":998,"value":1625},{"type":993,"tag":1026,"props":7479,"children":7480},{"style":1053},[7481],{"type":998,"value":7482},"part_time.calculate_pay()",{"type":993,"tag":1026,"props":7484,"children":7485},{"style":1067},[7486],{"type":998,"value":1157},{"type":993,"tag":1026,"props":7488,"children":7489},{"style":1139},[7490],{"type":998,"value":1639},{"type":993,"tag":1026,"props":7492,"children":7493},{"style":1053},[7494],{"type":998,"value":1549},{"type":993,"tag":1837,"props":7496,"children":7498},{"id":7497},"solution-and-explanation",[7499],{"type":998,"value":7500},"Solution and Explanation 💡",{"type":993,"tag":7502,"props":7503,"children":7504},"details",{},[7505,7513,8207,8215],{"type":993,"tag":7506,"props":7507,"children":7510},"summary",{"className":7508},[7509],"cursor-pointer",[7511],{"type":998,"value":7512},"Click to see the complete solution",{"type":993,"tag":1012,"props":7514,"children":7515},{},[7516],{"type":993,"tag":1016,"props":7517,"children":7519},{"className":1018,"code":7518,"language":6,"meta":8,"style":8},"class Employee:\n    def __init__(self, name, base_salary):\n        # Set name and base_salary attributes\n        self.name = name\n        self.base_salary = base_salary\n    \n    def calculate_pay(self):\n        # Base pay calculation (can be generic)\n        return self.base_salary\n    \n    def get_info(self):\n        # Return employee information\n        return f\"Employee: {self.name}\"\n\nclass FullTimeEmployee(Employee):\n    def __init__(self, name, base_salary):\n        # Call parent constructor\n        super().__init__(name, base_salary)\n    \n    def calculate_pay(self):\n        # Override to return full salary\n        return self.base_salary\n\nclass PartTimeEmployee(Employee):\n    def __init__(self, name, hourly_rate, hours_worked):\n        # Call parent constructor and set additional attributes\n        super().__init__(name, 0)  # Base salary not used for part-time\n        self.hourly_rate = hourly_rate\n        self.hours_worked = hours_worked\n    \n    def calculate_pay(self):\n        # Override to calculate hourly pay\n        return self.hourly_rate * self.hours_worked\n\n# Test your classes\nfull_time = FullTimeEmployee(\"Alice\", 5000)\npart_time = PartTimeEmployee(\"Bob\", 20, 25)\n\nprint(full_time.get_info())\nprint(f\"Pay: ${full_time.calculate_pay()}\")\nprint(part_time.get_info())\nprint(f\"Pay: ${part_time.calculate_pay()}\")\n",[7520],{"type":993,"tag":1022,"props":7521,"children":7522},{"__ignoreMap":8},[7523,7538,7553,7561,7580,7601,7608,7623,7631,7647,7654,7669,7677,7710,7717,7740,7755,7763,7783,7790,7805,7813,7828,7835,7858,7873,7881,7915,7936,7957,7964,7979,7987,8015,8022,8030,8061,8100,8107,8118,8157,8168],{"type":993,"tag":1026,"props":7524,"children":7525},{"class":1028,"line":12},[7526,7530,7534],{"type":993,"tag":1026,"props":7527,"children":7528},{"style":1041},[7529],{"type":998,"value":1044},{"type":993,"tag":1026,"props":7531,"children":7532},{"style":1047},[7533],{"type":998,"value":6915},{"type":993,"tag":1026,"props":7535,"children":7536},{"style":1053},[7537],{"type":998,"value":1056},{"type":993,"tag":1026,"props":7539,"children":7540},{"class":1028,"line":27},[7541,7545,7549],{"type":993,"tag":1026,"props":7542,"children":7543},{"style":1041},[7544],{"type":998,"value":1064},{"type":993,"tag":1026,"props":7546,"children":7547},{"style":1067},[7548],{"type":998,"value":1070},{"type":993,"tag":1026,"props":7550,"children":7551},{"style":1053},[7552],{"type":998,"value":6935},{"type":993,"tag":1026,"props":7554,"children":7555},{"class":1028,"line":36},[7556],{"type":993,"tag":1026,"props":7557,"children":7558},{"style":1032},[7559],{"type":998,"value":7560},"        # Set name and base_salary attributes\n",{"type":993,"tag":1026,"props":7562,"children":7563},{"class":1028,"line":45},[7564,7568,7572,7576],{"type":993,"tag":1026,"props":7565,"children":7566},{"style":1067},[7567],{"type":998,"value":1083},{"type":993,"tag":1026,"props":7569,"children":7570},{"style":1053},[7571],{"type":998,"value":3268},{"type":993,"tag":1026,"props":7573,"children":7574},{"style":1041},[7575],{"type":998,"value":1093},{"type":993,"tag":1026,"props":7577,"children":7578},{"style":1053},[7579],{"type":998,"value":3277},{"type":993,"tag":1026,"props":7581,"children":7582},{"class":1028,"line":54},[7583,7587,7592,7596],{"type":993,"tag":1026,"props":7584,"children":7585},{"style":1067},[7586],{"type":998,"value":1083},{"type":993,"tag":1026,"props":7588,"children":7589},{"style":1053},[7590],{"type":998,"value":7591},".base_salary ",{"type":993,"tag":1026,"props":7593,"children":7594},{"style":1041},[7595],{"type":998,"value":1093},{"type":993,"tag":1026,"props":7597,"children":7598},{"style":1053},[7599],{"type":998,"value":7600}," base_salary\n",{"type":993,"tag":1026,"props":7602,"children":7603},{"class":1028,"line":63},[7604],{"type":993,"tag":1026,"props":7605,"children":7606},{"style":1053},[7607],{"type":998,"value":1106},{"type":993,"tag":1026,"props":7609,"children":7610},{"class":1028,"line":72},[7611,7615,7619],{"type":993,"tag":1026,"props":7612,"children":7613},{"style":1041},[7614],{"type":998,"value":1064},{"type":993,"tag":1026,"props":7616,"children":7617},{"style":1047},[7618],{"type":998,"value":6980},{"type":993,"tag":1026,"props":7620,"children":7621},{"style":1053},[7622],{"type":998,"value":1123},{"type":993,"tag":1026,"props":7624,"children":7625},{"class":1028,"line":81},[7626],{"type":993,"tag":1026,"props":7627,"children":7628},{"style":1032},[7629],{"type":998,"value":7630},"        # Base pay calculation (can be generic)\n",{"type":993,"tag":1026,"props":7632,"children":7633},{"class":1028,"line":91},[7634,7638,7642],{"type":993,"tag":1026,"props":7635,"children":7636},{"style":1041},[7637],{"type":998,"value":1131},{"type":993,"tag":1026,"props":7639,"children":7640},{"style":1067},[7641],{"type":998,"value":1197},{"type":993,"tag":1026,"props":7643,"children":7644},{"style":1053},[7645],{"type":998,"value":7646},".base_salary\n",{"type":993,"tag":1026,"props":7648,"children":7649},{"class":1028,"line":100},[7650],{"type":993,"tag":1026,"props":7651,"children":7652},{"style":1053},[7653],{"type":998,"value":1106},{"type":993,"tag":1026,"props":7655,"children":7656},{"class":1028,"line":109},[7657,7661,7665],{"type":993,"tag":1026,"props":7658,"children":7659},{"style":1041},[7660],{"type":998,"value":1064},{"type":993,"tag":1026,"props":7662,"children":7663},{"style":1047},[7664],{"type":998,"value":1986},{"type":993,"tag":1026,"props":7666,"children":7667},{"style":1053},[7668],{"type":998,"value":1123},{"type":993,"tag":1026,"props":7670,"children":7671},{"class":1028,"line":118},[7672],{"type":993,"tag":1026,"props":7673,"children":7674},{"style":1032},[7675],{"type":998,"value":7676},"        # Return employee information\n",{"type":993,"tag":1026,"props":7678,"children":7679},{"class":1028,"line":127},[7680,7684,7688,7693,7697,7702,7706],{"type":993,"tag":1026,"props":7681,"children":7682},{"style":1041},[7683],{"type":998,"value":1131},{"type":993,"tag":1026,"props":7685,"children":7686},{"style":1041},[7687],{"type":998,"value":1136},{"type":993,"tag":1026,"props":7689,"children":7690},{"style":1139},[7691],{"type":998,"value":7692},"\"Employee: ",{"type":993,"tag":1026,"props":7694,"children":7695},{"style":1067},[7696],{"type":998,"value":1147},{"type":993,"tag":1026,"props":7698,"children":7699},{"style":1053},[7700],{"type":998,"value":7701},".name",{"type":993,"tag":1026,"props":7703,"children":7704},{"style":1067},[7705],{"type":998,"value":1157},{"type":993,"tag":1026,"props":7707,"children":7708},{"style":1139},[7709],{"type":998,"value":1967},{"type":993,"tag":1026,"props":7711,"children":7712},{"class":1028,"line":136},[7713],{"type":993,"tag":1026,"props":7714,"children":7715},{"emptyLinePlaceholder":13},[7716],{"type":998,"value":1224},{"type":993,"tag":1026,"props":7718,"children":7719},{"class":1028,"line":146},[7720,7724,7728,7732,7736],{"type":993,"tag":1026,"props":7721,"children":7722},{"style":1041},[7723],{"type":998,"value":1044},{"type":993,"tag":1026,"props":7725,"children":7726},{"style":1047},[7727],{"type":998,"value":7071},{"type":993,"tag":1026,"props":7729,"children":7730},{"style":1053},[7731],{"type":998,"value":1241},{"type":993,"tag":1026,"props":7733,"children":7734},{"style":1047},[7735],{"type":998,"value":7080},{"type":993,"tag":1026,"props":7737,"children":7738},{"style":1053},[7739],{"type":998,"value":1251},{"type":993,"tag":1026,"props":7741,"children":7742},{"class":1028,"line":155},[7743,7747,7751],{"type":993,"tag":1026,"props":7744,"children":7745},{"style":1041},[7746],{"type":998,"value":1064},{"type":993,"tag":1026,"props":7748,"children":7749},{"style":1067},[7750],{"type":998,"value":1070},{"type":993,"tag":1026,"props":7752,"children":7753},{"style":1053},[7754],{"type":998,"value":6935},{"type":993,"tag":1026,"props":7756,"children":7757},{"class":1028,"line":164},[7758],{"type":993,"tag":1026,"props":7759,"children":7760},{"style":1032},[7761],{"type":998,"value":7762},"        # Call parent constructor\n",{"type":993,"tag":1026,"props":7764,"children":7765},{"class":1028,"line":173},[7766,7770,7774,7778],{"type":993,"tag":1026,"props":7767,"children":7768},{"style":1067},[7769],{"type":998,"value":3422},{"type":993,"tag":1026,"props":7771,"children":7772},{"style":1053},[7773],{"type":998,"value":3427},{"type":993,"tag":1026,"props":7775,"children":7776},{"style":1067},[7777],{"type":998,"value":3432},{"type":993,"tag":1026,"props":7779,"children":7780},{"style":1053},[7781],{"type":998,"value":7782},"(name, base_salary)\n",{"type":993,"tag":1026,"props":7784,"children":7785},{"class":1028,"line":182},[7786],{"type":993,"tag":1026,"props":7787,"children":7788},{"style":1053},[7789],{"type":998,"value":1106},{"type":993,"tag":1026,"props":7791,"children":7792},{"class":1028,"line":191},[7793,7797,7801],{"type":993,"tag":1026,"props":7794,"children":7795},{"style":1041},[7796],{"type":998,"value":1064},{"type":993,"tag":1026,"props":7798,"children":7799},{"style":1047},[7800],{"type":998,"value":6980},{"type":993,"tag":1026,"props":7802,"children":7803},{"style":1053},[7804],{"type":998,"value":1123},{"type":993,"tag":1026,"props":7806,"children":7807},{"class":1028,"line":201},[7808],{"type":993,"tag":1026,"props":7809,"children":7810},{"style":1032},[7811],{"type":998,"value":7812},"        # Override to return full salary\n",{"type":993,"tag":1026,"props":7814,"children":7815},{"class":1028,"line":210},[7816,7820,7824],{"type":993,"tag":1026,"props":7817,"children":7818},{"style":1041},[7819],{"type":998,"value":1131},{"type":993,"tag":1026,"props":7821,"children":7822},{"style":1067},[7823],{"type":998,"value":1197},{"type":993,"tag":1026,"props":7825,"children":7826},{"style":1053},[7827],{"type":998,"value":7646},{"type":993,"tag":1026,"props":7829,"children":7830},{"class":1028,"line":219},[7831],{"type":993,"tag":1026,"props":7832,"children":7833},{"emptyLinePlaceholder":13},[7834],{"type":998,"value":1224},{"type":993,"tag":1026,"props":7836,"children":7837},{"class":1028,"line":228},[7838,7842,7846,7850,7854],{"type":993,"tag":1026,"props":7839,"children":7840},{"style":1041},[7841],{"type":998,"value":1044},{"type":993,"tag":1026,"props":7843,"children":7844},{"style":1047},[7845],{"type":998,"value":7186},{"type":993,"tag":1026,"props":7847,"children":7848},{"style":1053},[7849],{"type":998,"value":1241},{"type":993,"tag":1026,"props":7851,"children":7852},{"style":1047},[7853],{"type":998,"value":7080},{"type":993,"tag":1026,"props":7855,"children":7856},{"style":1053},[7857],{"type":998,"value":1251},{"type":993,"tag":1026,"props":7859,"children":7860},{"class":1028,"line":238},[7861,7865,7869],{"type":993,"tag":1026,"props":7862,"children":7863},{"style":1041},[7864],{"type":998,"value":1064},{"type":993,"tag":1026,"props":7866,"children":7867},{"style":1067},[7868],{"type":998,"value":1070},{"type":993,"tag":1026,"props":7870,"children":7871},{"style":1053},[7872],{"type":998,"value":7214},{"type":993,"tag":1026,"props":7874,"children":7875},{"class":1028,"line":247},[7876],{"type":993,"tag":1026,"props":7877,"children":7878},{"style":1032},[7879],{"type":998,"value":7880},"        # Call parent constructor and set additional attributes\n",{"type":993,"tag":1026,"props":7882,"children":7883},{"class":1028,"line":256},[7884,7888,7892,7896,7901,7905,7910],{"type":993,"tag":1026,"props":7885,"children":7886},{"style":1067},[7887],{"type":998,"value":3422},{"type":993,"tag":1026,"props":7889,"children":7890},{"style":1053},[7891],{"type":998,"value":3427},{"type":993,"tag":1026,"props":7893,"children":7894},{"style":1067},[7895],{"type":998,"value":3432},{"type":993,"tag":1026,"props":7897,"children":7898},{"style":1053},[7899],{"type":998,"value":7900},"(name, ",{"type":993,"tag":1026,"props":7902,"children":7903},{"style":1067},[7904],{"type":998,"value":2933},{"type":993,"tag":1026,"props":7906,"children":7907},{"style":1053},[7908],{"type":998,"value":7909},")  ",{"type":993,"tag":1026,"props":7911,"children":7912},{"style":1032},[7913],{"type":998,"value":7914},"# Base salary not used for part-time\n",{"type":993,"tag":1026,"props":7916,"children":7917},{"class":1028,"line":265},[7918,7922,7927,7931],{"type":993,"tag":1026,"props":7919,"children":7920},{"style":1067},[7921],{"type":998,"value":1083},{"type":993,"tag":1026,"props":7923,"children":7924},{"style":1053},[7925],{"type":998,"value":7926},".hourly_rate ",{"type":993,"tag":1026,"props":7928,"children":7929},{"style":1041},[7930],{"type":998,"value":1093},{"type":993,"tag":1026,"props":7932,"children":7933},{"style":1053},[7934],{"type":998,"value":7935}," hourly_rate\n",{"type":993,"tag":1026,"props":7937,"children":7938},{"class":1028,"line":274},[7939,7943,7948,7952],{"type":993,"tag":1026,"props":7940,"children":7941},{"style":1067},[7942],{"type":998,"value":1083},{"type":993,"tag":1026,"props":7944,"children":7945},{"style":1053},[7946],{"type":998,"value":7947},".hours_worked ",{"type":993,"tag":1026,"props":7949,"children":7950},{"style":1041},[7951],{"type":998,"value":1093},{"type":993,"tag":1026,"props":7953,"children":7954},{"style":1053},[7955],{"type":998,"value":7956}," hours_worked\n",{"type":993,"tag":1026,"props":7958,"children":7959},{"class":1028,"line":284},[7960],{"type":993,"tag":1026,"props":7961,"children":7962},{"style":1053},[7963],{"type":998,"value":1106},{"type":993,"tag":1026,"props":7965,"children":7966},{"class":1028,"line":293},[7967,7971,7975],{"type":993,"tag":1026,"props":7968,"children":7969},{"style":1041},[7970],{"type":998,"value":1064},{"type":993,"tag":1026,"props":7972,"children":7973},{"style":1047},[7974],{"type":998,"value":6980},{"type":993,"tag":1026,"props":7976,"children":7977},{"style":1053},[7978],{"type":998,"value":1123},{"type":993,"tag":1026,"props":7980,"children":7981},{"class":1028,"line":302},[7982],{"type":993,"tag":1026,"props":7983,"children":7984},{"style":1032},[7985],{"type":998,"value":7986},"        # Override to calculate hourly pay\n",{"type":993,"tag":1026,"props":7988,"children":7989},{"class":1028,"line":311},[7990,7994,7998,8002,8006,8010],{"type":993,"tag":1026,"props":7991,"children":7992},{"style":1041},[7993],{"type":998,"value":1131},{"type":993,"tag":1026,"props":7995,"children":7996},{"style":1067},[7997],{"type":998,"value":1197},{"type":993,"tag":1026,"props":7999,"children":8000},{"style":1053},[8001],{"type":998,"value":7926},{"type":993,"tag":1026,"props":8003,"children":8004},{"style":1041},[8005],{"type":998,"value":1206},{"type":993,"tag":1026,"props":8007,"children":8008},{"style":1067},[8009],{"type":998,"value":1197},{"type":993,"tag":1026,"props":8011,"children":8012},{"style":1053},[8013],{"type":998,"value":8014},".hours_worked\n",{"type":993,"tag":1026,"props":8016,"children":8017},{"class":1028,"line":320},[8018],{"type":993,"tag":1026,"props":8019,"children":8020},{"emptyLinePlaceholder":13},[8021],{"type":998,"value":1224},{"type":993,"tag":1026,"props":8023,"children":8024},{"class":1028,"line":329},[8025],{"type":993,"tag":1026,"props":8026,"children":8027},{"style":1032},[8028],{"type":998,"value":8029},"# Test your classes\n",{"type":993,"tag":1026,"props":8031,"children":8032},{"class":1028,"line":338},[8033,8037,8041,8045,8049,8053,8057],{"type":993,"tag":1026,"props":8034,"children":8035},{"style":1053},[8036],{"type":998,"value":7314},{"type":993,"tag":1026,"props":8038,"children":8039},{"style":1041},[8040],{"type":998,"value":1093},{"type":993,"tag":1026,"props":8042,"children":8043},{"style":1053},[8044],{"type":998,"value":7323},{"type":993,"tag":1026,"props":8046,"children":8047},{"style":1139},[8048],{"type":998,"value":6595},{"type":993,"tag":1026,"props":8050,"children":8051},{"style":1053},[8052],{"type":998,"value":3091},{"type":993,"tag":1026,"props":8054,"children":8055},{"style":1067},[8056],{"type":998,"value":7336},{"type":993,"tag":1026,"props":8058,"children":8059},{"style":1053},[8060],{"type":998,"value":1549},{"type":993,"tag":1026,"props":8062,"children":8063},{"class":1028,"line":347},[8064,8068,8072,8076,8080,8084,8088,8092,8096],{"type":993,"tag":1026,"props":8065,"children":8066},{"style":1053},[8067],{"type":998,"value":7348},{"type":993,"tag":1026,"props":8069,"children":8070},{"style":1041},[8071],{"type":998,"value":1093},{"type":993,"tag":1026,"props":8073,"children":8074},{"style":1053},[8075],{"type":998,"value":7357},{"type":993,"tag":1026,"props":8077,"children":8078},{"style":1139},[8079],{"type":998,"value":6631},{"type":993,"tag":1026,"props":8081,"children":8082},{"style":1053},[8083],{"type":998,"value":3091},{"type":993,"tag":1026,"props":8085,"children":8086},{"style":1067},[8087],{"type":998,"value":7370},{"type":993,"tag":1026,"props":8089,"children":8090},{"style":1053},[8091],{"type":998,"value":3091},{"type":993,"tag":1026,"props":8093,"children":8094},{"style":1067},[8095],{"type":998,"value":6648},{"type":993,"tag":1026,"props":8097,"children":8098},{"style":1053},[8099],{"type":998,"value":1549},{"type":993,"tag":1026,"props":8101,"children":8102},{"class":1028,"line":356},[8103],{"type":993,"tag":1026,"props":8104,"children":8105},{"emptyLinePlaceholder":13},[8106],{"type":998,"value":1224},{"type":993,"tag":1026,"props":8108,"children":8109},{"class":1028,"line":365},[8110,8114],{"type":993,"tag":1026,"props":8111,"children":8112},{"style":1067},[8113],{"type":998,"value":1589},{"type":993,"tag":1026,"props":8115,"children":8116},{"style":1053},[8117],{"type":998,"value":7401},{"type":993,"tag":1026,"props":8119,"children":8120},{"class":1028,"line":374},[8121,8125,8129,8133,8137,8141,8145,8149,8153],{"type":993,"tag":1026,"props":8122,"children":8123},{"style":1067},[8124],{"type":998,"value":1589},{"type":993,"tag":1026,"props":8126,"children":8127},{"style":1053},[8128],{"type":998,"value":1241},{"type":993,"tag":1026,"props":8130,"children":8131},{"style":1041},[8132],{"type":998,"value":1615},{"type":993,"tag":1026,"props":8134,"children":8135},{"style":1139},[8136],{"type":998,"value":7421},{"type":993,"tag":1026,"props":8138,"children":8139},{"style":1067},[8140],{"type":998,"value":1625},{"type":993,"tag":1026,"props":8142,"children":8143},{"style":1053},[8144],{"type":998,"value":7430},{"type":993,"tag":1026,"props":8146,"children":8147},{"style":1067},[8148],{"type":998,"value":1157},{"type":993,"tag":1026,"props":8150,"children":8151},{"style":1139},[8152],{"type":998,"value":1639},{"type":993,"tag":1026,"props":8154,"children":8155},{"style":1053},[8156],{"type":998,"value":1549},{"type":993,"tag":1026,"props":8158,"children":8159},{"class":1028,"line":384},[8160,8164],{"type":993,"tag":1026,"props":8161,"children":8162},{"style":1067},[8163],{"type":998,"value":1589},{"type":993,"tag":1026,"props":8165,"children":8166},{"style":1053},[8167],{"type":998,"value":7454},{"type":993,"tag":1026,"props":8169,"children":8170},{"class":1028,"line":393},[8171,8175,8179,8183,8187,8191,8195,8199,8203],{"type":993,"tag":1026,"props":8172,"children":8173},{"style":1067},[8174],{"type":998,"value":1589},{"type":993,"tag":1026,"props":8176,"children":8177},{"style":1053},[8178],{"type":998,"value":1241},{"type":993,"tag":1026,"props":8180,"children":8181},{"style":1041},[8182],{"type":998,"value":1615},{"type":993,"tag":1026,"props":8184,"children":8185},{"style":1139},[8186],{"type":998,"value":7421},{"type":993,"tag":1026,"props":8188,"children":8189},{"style":1067},[8190],{"type":998,"value":1625},{"type":993,"tag":1026,"props":8192,"children":8193},{"style":1053},[8194],{"type":998,"value":7482},{"type":993,"tag":1026,"props":8196,"children":8197},{"style":1067},[8198],{"type":998,"value":1157},{"type":993,"tag":1026,"props":8200,"children":8201},{"style":1139},[8202],{"type":998,"value":1639},{"type":993,"tag":1026,"props":8204,"children":8205},{"style":1053},[8206],{"type":998,"value":1549},{"type":993,"tag":1001,"props":8208,"children":8209},{},[8210],{"type":993,"tag":1729,"props":8211,"children":8212},{},[8213],{"type":998,"value":8214},"Key Learning Points:",{"type":993,"tag":1735,"props":8216,"children":8217},{},[8218,8230,8248,8259,8270],{"type":993,"tag":1739,"props":8219,"children":8220},{},[8221,8223,8228],{"type":998,"value":8222},"📌 ",{"type":993,"tag":1729,"props":8224,"children":8225},{},[8226],{"type":998,"value":8227},"Method overriding",{"type":998,"value":8229},": Child classes provide their own implementation of parent methods",{"type":993,"tag":1739,"props":8231,"children":8232},{},[8233,8234,8238,8240,8246],{"type":998,"value":8222},{"type":993,"tag":1729,"props":8235,"children":8236},{},[8237],{"type":998,"value":1782},{"type":998,"value":8239},": Same method name (",{"type":993,"tag":1022,"props":8241,"children":8243},{"className":8242},[],[8244],{"type":998,"value":8245},"calculate_pay()",{"type":998,"value":8247},") behaves differently in each class",{"type":993,"tag":1739,"props":8249,"children":8250},{},[8251,8252,8257],{"type":998,"value":8222},{"type":993,"tag":1729,"props":8253,"children":8254},{},[8255],{"type":998,"value":8256},"super() usage",{"type":998,"value":8258},": Call parent constructor to initialize common attributes",{"type":993,"tag":1739,"props":8260,"children":8261},{},[8262,8263,8268],{"type":998,"value":8222},{"type":993,"tag":1729,"props":8264,"children":8265},{},[8266],{"type":998,"value":8267},"Specialized behavior",{"type":998,"value":8269},": Each employee type calculates pay differently while maintaining same interface",{"type":993,"tag":1739,"props":8271,"children":8272},{},[8273,8274,8279,8281,8287],{"type":998,"value":8222},{"type":993,"tag":1729,"props":8275,"children":8276},{},[8277],{"type":998,"value":8278},"Code reuse",{"type":998,"value":8280},": Common functionality (like ",{"type":993,"tag":1022,"props":8282,"children":8284},{"className":8283},[],[8285],{"type":998,"value":8286},"get_info()",{"type":998,"value":8288},") stays in parent class",{"type":993,"tag":1001,"props":8290,"children":8291},{},[8292,8294,8300],{"type":998,"value":8293},"Learn more about ",{"type":993,"tag":8295,"props":8296,"children":8297},"a",{"href":717},[8298],{"type":998,"value":8299},"variable visibility",{"type":998,"value":8301}," to control access to your class attributes and methods.",{"type":993,"tag":1707,"props":8303,"children":8305},{"id":8304},"test-your-knowledge",[8306],{"type":998,"value":8307},"Test Your Knowledge",{"type":993,"tag":1001,"props":8309,"children":8310},{},[8311],{"type":998,"value":8312},"Test what you've learned about method overriding:",{"type":993,"tag":8314,"props":8315,"children":8319},"redirect-button",{"icon":8316,"label":8317,"url":8318},"pi pi-send","Take Quiz","/tutorial-quiz/python/method-overriding",[],{"type":993,"tag":1707,"props":8321,"children":8323},{"id":8322},"whats-next",[8324],{"type":998,"value":8325},"What's Next?",{"type":993,"tag":1001,"props":8327,"children":8328},{},[8329],{"type":998,"value":8330},"Now that you understand method overriding, you're ready to learn about variable visibility. This concept helps you control access to class attributes and methods, creating well-encapsulated objects with clear public and private interfaces.",{"type":993,"tag":1001,"props":8332,"children":8333},{},[8334,8336,8340],{"type":998,"value":8335},"Ready to continue? Check out our lesson on ",{"type":993,"tag":8295,"props":8337,"children":8338},{"href":717},[8339],{"type":998,"value":718},{"type":998,"value":8341},".",{"type":993,"tag":8343,"props":8344,"children":8345},"style",{},[8346],{"type":998,"value":8347},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .app-dark-mode .shiki span {color: var(--shiki-app-dark-mode);background: var(--shiki-app-dark-mode-bg);font-style: var(--shiki-app-dark-mode-font-style);font-weight: var(--shiki-app-dark-mode-font-weight);text-decoration: var(--shiki-app-dark-mode-text-decoration);}html.app-dark-mode .shiki span {color: var(--shiki-app-dark-mode);background: var(--shiki-app-dark-mode-bg);font-style: var(--shiki-app-dark-mode-font-style);font-weight: var(--shiki-app-dark-mode-font-weight);text-decoration: var(--shiki-app-dark-mode-text-decoration);}",{"title":8,"searchDepth":36,"depth":36,"links":8349},[8350,8354,8358,8361,8365,8366],{"id":1709,"depth":27,"text":1712,"children":8351},[8352,8353],{"id":1839,"depth":36,"text":1842},{"id":2395,"depth":36,"text":2398},{"id":3180,"depth":27,"text":3183,"children":8355},[8356,8357],{"id":3199,"depth":36,"text":3202},{"id":4018,"depth":36,"text":4021},{"id":5016,"depth":27,"text":5019,"children":8359},[8360],{"id":5027,"depth":36,"text":5030},{"id":5747,"depth":27,"text":5750,"children":8362},[8363,8364],{"id":5753,"depth":36,"text":5756},{"id":7497,"depth":36,"text":7500},{"id":8304,"depth":27,"text":8307},{"id":8322,"depth":27,"text":8325},1782373747552]