[{"data":1,"prerenderedAt":6010},["ShallowReactive",2],{"tutorials-python-how-to":3,"category-items-python-how-to":600,"content-/python-how-to/create-decorators":601},[4,22,31,40,49,58,67,76,86,94,103,112,121,130,139,148,158,167,176,185,194,203,212,222,231,240,249,258,267,276,285,297,306,315,324,333,342,351,362,371,380,389,398,407,418,427,436,445,454,463,472,483,492,501,510,519,528,539,548,557,566,575,584,593],{"_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-how-to/string-manipulation","python-how-to",false,"","String Manipulation","Learn essential string manipulation techniques in Python","string-manipulation",1,true,"pi pi-folder","markdown","content:python-how-to:1.string-manipulation.md","content","python-how-to/1.string-manipulation.md","python-how-to/1.string-manipulation","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-how-to/split-join-strings","Split and Join Strings","Learn how to split strings into lists and join lists back into strings in Python","split-join-strings",2,"content:python-how-to:2.split-join-strings.md","python-how-to/2.split-join-strings.md","python-how-to/2.split-join-strings",{"_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-how-to/remove-whitespace","Remove Whitespace","Learn how to clean up and remove unwanted whitespace from strings in Python","remove-whitespace",3,"content:python-how-to:3.remove-whitespace.md","python-how-to/3.remove-whitespace.md","python-how-to/3.remove-whitespace",{"_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-how-to/find-replace-text","Find and Replace Text","Learn how to search for and replace text within strings in Python","find-replace-text",4,"content:python-how-to:4.find-replace-text.md","python-how-to/4.find-replace-text.md","python-how-to/4.find-replace-text",{"_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-how-to/check-string-content","Check String Content","Learn how to validate and check the content of strings in Python","check-string-content",5,"content:python-how-to:5.check-string-content.md","python-how-to/5.check-string-content.md","python-how-to/5.check-string-content",{"_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-how-to/format-strings","Format Strings","Learn how to format strings in Python using f-strings and format() method","format-strings",6,"content:python-how-to:6.format-strings.md","python-how-to/6.format-strings.md","python-how-to/6.format-strings",{"_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-how-to/unicode-special-chars","Handle Unicode and Special Characters","Learn how to work with Unicode and special characters in Python strings","unicode-special-chars",7,"content:python-how-to:7.unicode-special-chars.md","python-how-to/7.unicode-special-chars.md","python-how-to/7.unicode-special-chars",{"_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-how-to/list-operations","List Operations","Learn essential operations for working with lists in Python","list-operations",8,"content:python-how-to:8.list-operations.md","python-how-to/8.list-operations.md","python-how-to/8.list-operations",[86,94,103,112,121,130,139],{"_path":87,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":88,"description":89,"slug":90,"parentId":77,"order":81,"_type":15,"_id":91,"_source":17,"_file":92,"_stem":93,"_extension":20},"/python-how-to/sort-lists","Sort Lists","Learn how to sort lists in Python using different methods and custom sorting","sort-lists","content:python-how-to:9.sort-lists.md","python-how-to/9.sort-lists.md","python-how-to/9.sort-lists",{"_path":95,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":96,"description":97,"slug":98,"parentId":77,"order":99,"_type":15,"_id":100,"_source":17,"_file":101,"_stem":102,"_extension":20},"/python-how-to/remove-duplicates","Remove Duplicates","Learn how to remove duplicate elements from lists in Python","remove-duplicates",10,"content:python-how-to:10.remove-duplicates.md","python-how-to/10.remove-duplicates.md","python-how-to/10.remove-duplicates",{"_path":104,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":105,"description":106,"slug":107,"parentId":77,"order":108,"_type":15,"_id":109,"_source":17,"_file":110,"_stem":111,"_extension":20},"/python-how-to/filter-lists","Filter Lists","Learn how to filter lists in Python using different methods","filter-lists",11,"content:python-how-to:11.filter-lists.md","python-how-to/11.filter-lists.md","python-how-to/11.filter-lists",{"_path":113,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":114,"description":115,"slug":116,"parentId":77,"order":117,"_type":15,"_id":118,"_source":17,"_file":119,"_stem":120,"_extension":20},"/python-how-to/combine-lists","Combine Lists","Learn different methods to combine lists in Python","combine-lists",12,"content:python-how-to:12.combine-lists.md","python-how-to/12.combine-lists.md","python-how-to/12.combine-lists",{"_path":122,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":123,"description":124,"slug":125,"parentId":77,"order":126,"_type":15,"_id":127,"_source":17,"_file":128,"_stem":129,"_extension":20},"/python-how-to/list-comprehensions","Use List Comprehensions","Learn how to create and transform lists efficiently using Python's list comprehension syntax","list-comprehensions",13,"content:python-how-to:13.list-comprehensions.md","python-how-to/13.list-comprehensions.md","python-how-to/13.list-comprehensions",{"_path":131,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":132,"description":133,"slug":134,"parentId":77,"order":135,"_type":15,"_id":136,"_source":17,"_file":137,"_stem":138,"_extension":20},"/python-how-to/nested-lists","Work with Nested Lists","Learn how to work with nested lists (2D arrays) in Python","nested-lists",14,"content:python-how-to:14.nested-lists.md","python-how-to/14.nested-lists.md","python-how-to/14.nested-lists",{"_path":140,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":141,"description":142,"slug":143,"parentId":77,"order":144,"_type":15,"_id":145,"_source":17,"_file":146,"_stem":147,"_extension":20},"/python-how-to/enumerate-zip","Use enumerate() and zip()","Learn how to use enumerate() and zip() for efficient iteration in Python","enumerate-zip",15,"content:python-how-to:15.enumerate-zip.md","python-how-to/15.enumerate-zip.md","python-how-to/15.enumerate-zip",{"_path":149,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":150,"description":151,"slug":152,"order":153,"isParent":13,"icon":14,"_type":15,"_id":154,"_source":17,"_file":155,"_stem":156,"_extension":20,"children":157,"expanded":13},"/python-how-to/dictionary-operations","Dictionary Operations","Learn essential operations for working with dictionaries in Python","dictionary-operations",16,"content:python-how-to:16.dictionary-operations.md","python-how-to/16.dictionary-operations.md","python-how-to/16.dictionary-operations",[158,167,176,185,194,203],{"_path":159,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":160,"description":161,"slug":162,"parentId":149,"order":163,"_type":15,"_id":164,"_source":17,"_file":165,"_stem":166,"_extension":20},"/python-how-to/merge-dictionaries","Merge Dictionaries","Learn different methods to merge dictionaries in Python","merge-dictionaries",17,"content:python-how-to:17.merge-dictionaries.md","python-how-to/17.merge-dictionaries.md","python-how-to/17.merge-dictionaries",{"_path":168,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":169,"description":170,"slug":171,"parentId":149,"order":172,"_type":15,"_id":173,"_source":17,"_file":174,"_stem":175,"_extension":20},"/python-how-to/sort-dictionaries","Sort Dictionaries","Learn how to sort dictionaries by keys or values in Python","sort-dictionaries",18,"content:python-how-to:18.sort-dictionaries.md","python-how-to/18.sort-dictionaries.md","python-how-to/18.sort-dictionaries",{"_path":177,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":178,"description":179,"slug":180,"parentId":149,"order":181,"_type":15,"_id":182,"_source":17,"_file":183,"_stem":184,"_extension":20},"/python-how-to/filter-dictionaries","Filter Dictionaries","Learn how to filter dictionaries based on keys or values in Python","filter-dictionaries",19,"content:python-how-to:19.filter-dictionaries.md","python-how-to/19.filter-dictionaries.md","python-how-to/19.filter-dictionaries",{"_path":186,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":187,"description":188,"slug":189,"parentId":149,"order":190,"_type":15,"_id":191,"_source":17,"_file":192,"_stem":193,"_extension":20},"/python-how-to/handle-missing-keys","Handle Missing Keys","Learn safe ways to access dictionary keys and handle missing values","handle-missing-keys",20,"content:python-how-to:20.handle-missing-keys.md","python-how-to/20.handle-missing-keys.md","python-how-to/20.handle-missing-keys",{"_path":195,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":196,"description":197,"slug":198,"parentId":149,"order":199,"_type":15,"_id":200,"_source":17,"_file":201,"_stem":202,"_extension":20},"/python-how-to/dictionary-comprehensions","Use Dictionary Comprehensions","Learn how to create dictionaries efficiently using comprehensions","dictionary-comprehensions",21,"content:python-how-to:21.dictionary-comprehensions.md","python-how-to/21.dictionary-comprehensions.md","python-how-to/21.dictionary-comprehensions",{"_path":204,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":205,"description":206,"slug":207,"parentId":149,"order":208,"_type":15,"_id":209,"_source":17,"_file":210,"_stem":211,"_extension":20},"/python-how-to/convert-lists-dictionaries","Convert Between Lists and Dictionaries","Learn how to transform data between lists and dictionaries in Python","convert-lists-dictionaries",22,"content:python-how-to:22.convert-lists-dictionaries.md","python-how-to/22.convert-lists-dictionaries.md","python-how-to/22.convert-lists-dictionaries",{"_path":213,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":214,"description":215,"slug":216,"order":217,"isParent":13,"icon":14,"_type":15,"_id":218,"_source":17,"_file":219,"_stem":220,"_extension":20,"children":221,"expanded":13},"/python-how-to/file-operations","File Operations","Learn essential file operations in Python for reading, writing, and managing files","file-operations",23,"content:python-how-to:23.file-operations.md","python-how-to/23.file-operations.md","python-how-to/23.file-operations",[222,231,240,249,258,267,276],{"_path":223,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":224,"description":225,"slug":226,"parentId":213,"order":227,"_type":15,"_id":228,"_source":17,"_file":229,"_stem":230,"_extension":20},"/python-how-to/read-text-files","Read Text Files","Learn how to read text files in Python using different methods","read-text-files",24,"content:python-how-to:24.read-text-files.md","python-how-to/24.read-text-files.md","python-how-to/24.read-text-files",{"_path":232,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":233,"description":234,"slug":235,"parentId":213,"order":236,"_type":15,"_id":237,"_source":17,"_file":238,"_stem":239,"_extension":20},"/python-how-to/write-to-files","Write to Files","Learn how to write and create files in Python using different methods","write-to-files",25,"content:python-how-to:25.write-to-files.md","python-how-to/25.write-to-files.md","python-how-to/25.write-to-files",{"_path":241,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":242,"description":243,"slug":244,"parentId":213,"order":245,"_type":15,"_id":246,"_source":17,"_file":247,"_stem":248,"_extension":20},"/python-how-to/work-csv-files","Work with CSV Files","Learn how to read and write CSV files in Python using the csv module","work-csv-files",26,"content:python-how-to:26.work-csv-files.md","python-how-to/26.work-csv-files.md","python-how-to/26.work-csv-files",{"_path":250,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":251,"description":252,"slug":253,"parentId":213,"order":254,"_type":15,"_id":255,"_source":17,"_file":256,"_stem":257,"_extension":20},"/python-how-to/handle-file-paths","Handle File Paths","Learn how to work with file and directory paths in Python using pathlib and os modules","handle-file-paths",27,"content:python-how-to:27.handle-file-paths.md","python-how-to/27.handle-file-paths.md","python-how-to/27.handle-file-paths",{"_path":259,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":260,"description":261,"slug":262,"parentId":213,"order":263,"_type":15,"_id":264,"_source":17,"_file":265,"_stem":266,"_extension":20},"/python-how-to/work-json-files","Work with JSON Files","Learn how to read and write JSON files in Python using the json module","work-json-files",28,"content:python-how-to:28.work-json-files.md","python-how-to/28.work-json-files.md","python-how-to/28.work-json-files",{"_path":268,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":269,"description":270,"slug":271,"parentId":213,"order":272,"_type":15,"_id":273,"_source":17,"_file":274,"_stem":275,"_extension":20},"/python-how-to/handle-binary-files","Handle Binary Files","Learn how to work with binary files in Python for images, data, and other non-text content","handle-binary-files",29,"content:python-how-to:29.handle-binary-files.md","python-how-to/29.handle-binary-files.md","python-how-to/29.handle-binary-files",{"_path":277,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":278,"description":279,"slug":280,"parentId":213,"order":281,"_type":15,"_id":282,"_source":17,"_file":283,"_stem":284,"_extension":20},"/python-how-to/use-context-managers","Use Context Managers","Learn how to use context managers for safe resource handling in Python","use-context-managers",30,"content:python-how-to:30.use-context-managers.md","python-how-to/30.use-context-managers.md","python-how-to/30.use-context-managers",{"_path":286,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":287,"description":288,"slug":289,"parentId":290,"order":291,"isParent":13,"icon":292,"_type":15,"_id":293,"_source":17,"_file":294,"_stem":295,"_extension":20,"children":296,"expanded":13},"/python-how-to/date-and-time","Date and Time","Master Python's date and time handling with datetime, time zones, formatting, and calculations","date-and-time","/python-how-to",31,"pi pi-calendar","content:python-how-to:31.date-and-time.md","python-how-to/31.date-and-time.md","python-how-to/31.date-and-time",[297,306,315,324,333,342],{"_path":298,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":299,"description":300,"slug":301,"parentId":286,"order":302,"_type":15,"_id":303,"_source":17,"_file":304,"_stem":305,"_extension":20},"/python-how-to/get-current-datetime","Get Current Date/Time","Learn how to get current date, time, and timestamps using Python's datetime module","get-current-datetime",32,"content:python-how-to:32.get-current-datetime.md","python-how-to/32.get-current-datetime.md","python-how-to/32.get-current-datetime",{"_path":307,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":308,"description":309,"slug":310,"parentId":286,"order":311,"_type":15,"_id":312,"_source":17,"_file":313,"_stem":314,"_extension":20},"/python-how-to/format-dates","Format Dates","Master date formatting with strftime, custom formats, and locale-aware formatting for user-friendly displays","format-dates",33,"content:python-how-to:33.format-dates.md","python-how-to/33.format-dates.md","python-how-to/33.format-dates",{"_path":316,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":317,"description":318,"slug":319,"parentId":286,"order":320,"_type":15,"_id":321,"_source":17,"_file":322,"_stem":323,"_extension":20},"/python-how-to/calculate-date-differences","Calculate Date Differences","Learn to calculate time differences, durations, and intervals using Python's timedelta for scheduling and analytics","calculate-date-differences",34,"content:python-how-to:34.calculate-date-differences.md","python-how-to/34.calculate-date-differences.md","python-how-to/34.calculate-date-differences",{"_path":325,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":326,"description":327,"slug":328,"parentId":286,"order":329,"_type":15,"_id":330,"_source":17,"_file":331,"_stem":332,"_extension":20},"/python-how-to/parse-date-strings","Parse Date Strings","Convert text dates into Python datetime objects using strptime, handle multiple formats, and validate date input","parse-date-strings",35,"content:python-how-to:35.parse-date-strings.md","python-how-to/35.parse-date-strings.md","python-how-to/35.parse-date-strings",{"_path":334,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":335,"description":336,"slug":337,"parentId":286,"order":338,"_type":15,"_id":339,"_source":17,"_file":340,"_stem":341,"_extension":20},"/python-how-to/handle-timezones","Handle Timezones","Master timezone handling with zoneinfo, UTC conversions, and timezone-aware datetime objects for global applications","handle-timezones",36,"content:python-how-to:36.handle-timezones.md","python-how-to/36.handle-timezones.md","python-how-to/36.handle-timezones",{"_path":343,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":344,"description":345,"slug":346,"parentId":286,"order":347,"_type":15,"_id":348,"_source":17,"_file":349,"_stem":350,"_extension":20},"/python-how-to/work-with-timestamps","Work with Timestamps","Master Unix timestamps in Python - convert between datetime objects and timestamps for APIs, databases, and system integration","work-with-timestamps",37,"content:python-how-to:37.work-with-timestamps.md","python-how-to/37.work-with-timestamps.md","python-how-to/37.work-with-timestamps",{"_path":352,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":353,"description":354,"slug":355,"parentId":290,"order":356,"isParent":13,"icon":357,"_type":15,"_id":358,"_source":17,"_file":359,"_stem":360,"_extension":20,"children":361,"expanded":13},"/python-how-to/error-handling","Error Handling","Learn Python's error handling with try/except, custom exceptions, debugging, logging, and retry logic for robust applications","error-handling",38,"pi pi-exclamation-triangle","content:python-how-to:38.error-handling.md","python-how-to/38.error-handling.md","python-how-to/38.error-handling",[362,371,380,389,398],{"_path":363,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":364,"description":365,"slug":366,"parentId":352,"order":367,"_type":15,"_id":368,"_source":17,"_file":369,"_stem":370,"_extension":20},"/python-how-to/handle-exceptions","Handle Exceptions","Master try/except blocks, multiple exception handling, and finally clauses for robust error handling in Python","handle-exceptions",39,"content:python-how-to:39.handle-exceptions.md","python-how-to/39.handle-exceptions.md","python-how-to/39.handle-exceptions",{"_path":372,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":373,"description":374,"slug":375,"parentId":352,"order":376,"_type":15,"_id":377,"_source":17,"_file":378,"_stem":379,"_extension":20},"/python-how-to/create-custom-exceptions","Create Custom Exceptions","Learn to create custom exception classes in Python for specific error handling and better code organization","create-custom-exceptions",40,"content:python-how-to:40.create-custom-exceptions.md","python-how-to/40.create-custom-exceptions.md","python-how-to/40.create-custom-exceptions",{"_path":381,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":382,"description":383,"slug":384,"parentId":352,"order":385,"_type":15,"_id":386,"_source":17,"_file":387,"_stem":388,"_extension":20},"/python-how-to/debug-code","Debug Code","Learn Python debugging techniques using print statements, the debugger, and tools to find and fix code issues","debug-code",41,"content:python-how-to:41.debug-code.md","python-how-to/41.debug-code.md","python-how-to/41.debug-code",{"_path":390,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":391,"description":392,"slug":393,"parentId":352,"order":394,"_type":15,"_id":395,"_source":17,"_file":396,"_stem":397,"_extension":20},"/python-how-to/use-logging","Use Logging","Learn Python's logging module for tracking application behavior, errors, and debugging information","use-logging",42,"content:python-how-to:42.use-logging.md","python-how-to/42.use-logging.md","python-how-to/42.use-logging",{"_path":399,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":400,"description":401,"slug":402,"parentId":352,"order":403,"_type":15,"_id":404,"_source":17,"_file":405,"_stem":406,"_extension":20},"/python-how-to/implement-retry-logic","Implement Retry Logic","Learn to implement retry mechanisms in Python for handling temporary failures and building resilient applications","implement-retry-logic",43,"content:python-how-to:43.implement-retry-logic.md","python-how-to/43.implement-retry-logic.md","python-how-to/43.implement-retry-logic",{"_path":408,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":409,"description":410,"slug":411,"parentId":290,"order":412,"isParent":13,"icon":413,"_type":15,"_id":414,"_source":17,"_file":415,"_stem":416,"_extension":20,"children":417,"expanded":13},"/python-how-to/functions-and-modules","Functions and Modules","Learn Python functions, modules, and code organization for building reusable, maintainable applications","functions-and-modules",44,"pi pi-box","content:python-how-to:44.functions-and-modules.md","python-how-to/44.functions-and-modules.md","python-how-to/44.functions-and-modules",[418,427,436,445,454,463],{"_path":419,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":420,"description":421,"slug":422,"parentId":408,"order":423,"_type":15,"_id":424,"_source":17,"_file":425,"_stem":426,"_extension":20},"/python-how-to/write-functions","Write Functions","Learn to create Python functions with parameters, return values, and documentation for reusable code","write-functions",45,"content:python-how-to:45.write-functions.md","python-how-to/45.write-functions.md","python-how-to/45.write-functions",{"_path":428,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":429,"description":430,"slug":431,"parentId":408,"order":432,"_type":15,"_id":433,"_source":17,"_file":434,"_stem":435,"_extension":20},"/python-how-to/use-args-kwargs","Use *args and **kwargs","Learn to use *args and **kwargs for flexible function arguments in Python","use-args-kwargs",46,"content:python-how-to:46.use-args-kwargs.md","python-how-to/46.use-args-kwargs.md","python-how-to/46.use-args-kwargs",{"_path":437,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":438,"description":439,"slug":440,"parentId":408,"order":441,"_type":15,"_id":442,"_source":17,"_file":443,"_stem":444,"_extension":20},"/python-how-to/create-decorators","Create Decorators","Learn to create and use Python decorators to enhance function behavior and add functionality","create-decorators",47,"content:python-how-to:47.create-decorators.md","python-how-to/47.create-decorators.md","python-how-to/47.create-decorators",{"_path":446,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":447,"description":448,"slug":449,"parentId":408,"order":450,"_type":15,"_id":451,"_source":17,"_file":452,"_stem":453,"_extension":20},"/python-how-to/use-generators","Use Generators","Learn to create memory-efficient generators with yield for processing large datasets and sequences","use-generators",48,"content:python-how-to:48.use-generators.md","python-how-to/48.use-generators.md","python-how-to/48.use-generators",{"_path":455,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":456,"description":457,"slug":458,"parentId":408,"order":459,"_type":15,"_id":460,"_source":17,"_file":461,"_stem":462,"_extension":20},"/python-how-to/work-modules-packages","Work with Modules and Packages","Learn to organize Python code with modules and packages, and use imports effectively","work-modules-packages",49,"content:python-how-to:49.work-modules-packages.md","python-how-to/49.work-modules-packages.md","python-how-to/49.work-modules-packages",{"_path":464,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":465,"description":466,"slug":467,"parentId":408,"order":468,"_type":15,"_id":469,"_source":17,"_file":470,"_stem":471,"_extension":20},"/python-how-to/create-virtual-environments","Create Virtual Environments","Learn to create and manage Python virtual environments for project dependency isolation","create-virtual-environments",50,"content:python-how-to:50.create-virtual-environments.md","python-how-to/50.create-virtual-environments.md","python-how-to/50.create-virtual-environments",{"_path":473,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":474,"description":475,"slug":476,"parentId":290,"order":477,"isParent":13,"icon":478,"_type":15,"_id":479,"_source":17,"_file":480,"_stem":481,"_extension":20,"children":482},"/python-how-to/data-processing","Data Processing","Learn Python data processing techniques including regex, APIs, databases, and large file handling","data-processing",51,"pi pi-database","content:python-how-to:51.data-processing.md","python-how-to/51.data-processing.md","python-how-to/51.data-processing",[483,492,501,510,519],{"_path":484,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":485,"description":486,"slug":487,"parentId":473,"order":488,"_type":15,"_id":489,"_source":17,"_file":490,"_stem":491,"_extension":20},"/python-how-to/work-regular-expressions","Work with Regular Expressions","Learn to use Python's re module for pattern matching, text extraction, and data validation","work-regular-expressions",52,"content:python-how-to:52.work-regular-expressions.md","python-how-to/52.work-regular-expressions.md","python-how-to/52.work-regular-expressions",{"_path":493,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":494,"description":495,"slug":496,"parentId":473,"order":497,"_type":15,"_id":498,"_source":17,"_file":499,"_stem":500,"_extension":20},"/python-how-to/parse-xml-html","Parse XML and HTML","Learn to extract data from XML and HTML documents using Python's built-in parsing tools","parse-xml-html",53,"content:python-how-to:53.parse-xml-html.md","python-how-to/53.parse-xml-html.md","python-how-to/53.parse-xml-html",{"_path":502,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":503,"description":504,"slug":505,"parentId":473,"order":506,"_type":15,"_id":507,"_source":17,"_file":508,"_stem":509,"_extension":20},"/python-how-to/handle-api-requests","Handle API Requests","Learn to fetch and process data from web APIs using Python's urllib and external requests library","handle-api-requests",54,"content:python-how-to:54.handle-api-requests.md","python-how-to/54.handle-api-requests.md","python-how-to/54.handle-api-requests",{"_path":511,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":512,"description":513,"slug":514,"parentId":473,"order":515,"_type":15,"_id":516,"_source":17,"_file":517,"_stem":518,"_extension":20},"/python-how-to/work-databases","Work with Databases","Learn to connect to and query SQL databases using Python's sqlite3 and database techniques","work-databases",55,"content:python-how-to:55.work-databases.md","python-how-to/55.work-databases.md","python-how-to/55.work-databases",{"_path":520,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":521,"description":522,"slug":523,"parentId":473,"order":524,"_type":15,"_id":525,"_source":17,"_file":526,"_stem":527,"_extension":20},"/python-how-to/process-large-files","Process Large Files","Learn memory-efficient techniques for handling large files and datasets in Python","process-large-files",56,"content:python-how-to:56.process-large-files.md","python-how-to/56.process-large-files.md","python-how-to/56.process-large-files",{"_path":529,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":530,"description":531,"slug":532,"parentId":290,"order":533,"isParent":13,"icon":534,"_type":15,"_id":535,"_source":17,"_file":536,"_stem":537,"_extension":20,"children":538},"/python-how-to/best-practices","Best Practices","Learn Python best practices for writing clean, maintainable, and efficient code","best-practices",57,"pi pi-star","content:python-how-to:57.best-practices.md","python-how-to/57.best-practices.md","python-how-to/57.best-practices",[539,548,557,566,575,584],{"_path":540,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":541,"description":542,"slug":543,"parentId":529,"order":544,"_type":15,"_id":545,"_source":17,"_file":546,"_stem":547,"_extension":20},"/python-how-to/structure-code","Structure Your Code","Learn to organize Python code with proper module structure, functions, and classes","structure-code",58,"content:python-how-to:58.structure-code.md","python-how-to/58.structure-code.md","python-how-to/58.structure-code",{"_path":549,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":550,"description":551,"slug":552,"parentId":529,"order":553,"_type":15,"_id":554,"_source":17,"_file":555,"_stem":556,"_extension":20},"/python-how-to/write-clean-code","Write Clean Code","Learn to write readable, maintainable Python code with proper naming, comments, and clear logic","write-clean-code",59,"content:python-how-to:59.write-clean-code.md","python-how-to/59.write-clean-code.md","python-how-to/59.write-clean-code",{"_path":558,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":559,"description":560,"slug":561,"parentId":529,"order":562,"_type":15,"_id":563,"_source":17,"_file":564,"_stem":565,"_extension":20},"/python-how-to/optimize-performance","Optimize Performance","Learn to identify and fix performance bottlenecks in Python code for faster execution","optimize-performance",60,"content:python-how-to:60.optimize-performance.md","python-how-to/60.optimize-performance.md","python-how-to/60.optimize-performance",{"_path":567,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":568,"description":569,"slug":570,"parentId":529,"order":571,"_type":15,"_id":572,"_source":17,"_file":573,"_stem":574,"_extension":20},"/python-how-to/write-unit-tests","Write Unit Tests","Learn to create reliable unit tests to verify your Python code works correctly and catch bugs early","write-unit-tests",61,"content:python-how-to:61.write-unit-tests.md","python-how-to/61.write-unit-tests.md","python-how-to/61.write-unit-tests",{"_path":576,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":577,"description":578,"slug":579,"parentId":529,"order":580,"_type":15,"_id":581,"_source":17,"_file":582,"_stem":583,"_extension":20},"/python-how-to/document-code","Document Your Code","Learn to write clear documentation and helpful comments for your Python code","document-code",62,"content:python-how-to:62.document-code.md","python-how-to/62.document-code.md","python-how-to/62.document-code",{"_path":585,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":586,"description":587,"slug":588,"parentId":529,"order":589,"_type":15,"_id":590,"_source":17,"_file":591,"_stem":592,"_extension":20},"/python-how-to/use-type-hints","Use Type Hints","Learn to add type annotations to Python code for better clarity, tooling support, and error detection","use-type-hints",63,"content:python-how-to:63.use-type-hints.md","python-how-to/63.use-type-hints.md","python-how-to/63.use-type-hints",{"_path":290,"_dir":8,"_draft":7,"_partial":7,"_locale":8,"title":594,"description":595,"slug":6,"order":596,"icon":14,"_type":15,"_id":597,"_source":17,"_file":598,"_stem":599,"_extension":20,"expanded":13},"Python How-To Guide","Practical Python tutorials for common programming tasks. Learn step-by-step solutions for string manipulation, file operations, data processing, and more with real-world examples.",0,"content:python-how-to:index.md","python-how-to/index.md","python-how-to/index",[436],{"_path":437,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":438,"description":439,"slug":440,"parentId":408,"order":441,"body":602,"_type":15,"_id":442,"_source":17,"_file":443,"_stem":444,"_extension":20},{"type":603,"children":604,"toc":5991},"root",[605,614,620,872,879,884,1026,1033,1463,1469,1963,1969,2085,2091,2097,2804,2810,3492,3498,4074,4080,4196,4202,5011,5017,5513,5519,5834,5840,5960,5966,5971,5985],{"type":606,"tag":607,"props":608,"children":610},"element","h1",{"id":609},"creating-decorators",[611],{"type":612,"value":613},"text","🎭 Creating Decorators",{"type":606,"tag":615,"props":616,"children":617},"p",{},[618],{"type":612,"value":619},"Decorators are a powerful way to modify or enhance functions without changing their code. They're like adding special features to functions - timing, logging, authentication, and more - in a clean, reusable way.",{"type":606,"tag":621,"props":622,"children":623},"code-try",{},[624],{"type":606,"tag":625,"props":626,"children":630},"pre",{"className":627,"code":628,"language":629,"meta":8,"style":8},"language-python shiki shiki-themes github-light github-dark","# Simple decorator example\ndef my_decorator(func):\n    def wrapper():\n        print(\"Before function call\")\n        result = func()\n        print(\"After function call\")\n        return result\n    return wrapper\n\n@my_decorator\ndef say_hello():\n    print(\"Hello, World!\")\n    return \"Done\"\n\n# Using the decorated function\nresult = say_hello()\n","python",[631],{"type":606,"tag":632,"props":633,"children":634},"code",{"__ignoreMap":8},[635,646,667,685,710,728,748,761,774,783,791,807,828,840,847,855],{"type":606,"tag":636,"props":637,"children":639},"span",{"class":638,"line":12},"line",[640],{"type":606,"tag":636,"props":641,"children":643},{"style":642},"--shiki-default:#6A737D;--shiki-app-dark-mode:#6A737D",[644],{"type":612,"value":645},"# Simple decorator example\n",{"type":606,"tag":636,"props":647,"children":648},{"class":638,"line":27},[649,655,661],{"type":606,"tag":636,"props":650,"children":652},{"style":651},"--shiki-default:#D73A49;--shiki-app-dark-mode:#F97583",[653],{"type":612,"value":654},"def",{"type":606,"tag":636,"props":656,"children":658},{"style":657},"--shiki-default:#6F42C1;--shiki-app-dark-mode:#B392F0",[659],{"type":612,"value":660}," my_decorator",{"type":606,"tag":636,"props":662,"children":664},{"style":663},"--shiki-default:#24292E;--shiki-app-dark-mode:#E1E4E8",[665],{"type":612,"value":666},"(func):\n",{"type":606,"tag":636,"props":668,"children":669},{"class":638,"line":36},[670,675,680],{"type":606,"tag":636,"props":671,"children":672},{"style":651},[673],{"type":612,"value":674},"    def",{"type":606,"tag":636,"props":676,"children":677},{"style":657},[678],{"type":612,"value":679}," wrapper",{"type":606,"tag":636,"props":681,"children":682},{"style":663},[683],{"type":612,"value":684},"():\n",{"type":606,"tag":636,"props":686,"children":687},{"class":638,"line":45},[688,694,699,705],{"type":606,"tag":636,"props":689,"children":691},{"style":690},"--shiki-default:#005CC5;--shiki-app-dark-mode:#79B8FF",[692],{"type":612,"value":693},"        print",{"type":606,"tag":636,"props":695,"children":696},{"style":663},[697],{"type":612,"value":698},"(",{"type":606,"tag":636,"props":700,"children":702},{"style":701},"--shiki-default:#032F62;--shiki-app-dark-mode:#9ECBFF",[703],{"type":612,"value":704},"\"Before function call\"",{"type":606,"tag":636,"props":706,"children":707},{"style":663},[708],{"type":612,"value":709},")\n",{"type":606,"tag":636,"props":711,"children":712},{"class":638,"line":54},[713,718,723],{"type":606,"tag":636,"props":714,"children":715},{"style":663},[716],{"type":612,"value":717},"        result ",{"type":606,"tag":636,"props":719,"children":720},{"style":651},[721],{"type":612,"value":722},"=",{"type":606,"tag":636,"props":724,"children":725},{"style":663},[726],{"type":612,"value":727}," func()\n",{"type":606,"tag":636,"props":729,"children":730},{"class":638,"line":63},[731,735,739,744],{"type":606,"tag":636,"props":732,"children":733},{"style":690},[734],{"type":612,"value":693},{"type":606,"tag":636,"props":736,"children":737},{"style":663},[738],{"type":612,"value":698},{"type":606,"tag":636,"props":740,"children":741},{"style":701},[742],{"type":612,"value":743},"\"After function call\"",{"type":606,"tag":636,"props":745,"children":746},{"style":663},[747],{"type":612,"value":709},{"type":606,"tag":636,"props":749,"children":750},{"class":638,"line":72},[751,756],{"type":606,"tag":636,"props":752,"children":753},{"style":651},[754],{"type":612,"value":755},"        return",{"type":606,"tag":636,"props":757,"children":758},{"style":663},[759],{"type":612,"value":760}," result\n",{"type":606,"tag":636,"props":762,"children":763},{"class":638,"line":81},[764,769],{"type":606,"tag":636,"props":765,"children":766},{"style":651},[767],{"type":612,"value":768},"    return",{"type":606,"tag":636,"props":770,"children":771},{"style":663},[772],{"type":612,"value":773}," wrapper\n",{"type":606,"tag":636,"props":775,"children":777},{"class":638,"line":776},9,[778],{"type":606,"tag":636,"props":779,"children":780},{"emptyLinePlaceholder":13},[781],{"type":612,"value":782},"\n",{"type":606,"tag":636,"props":784,"children":785},{"class":638,"line":99},[786],{"type":606,"tag":636,"props":787,"children":788},{"style":657},[789],{"type":612,"value":790},"@my_decorator\n",{"type":606,"tag":636,"props":792,"children":793},{"class":638,"line":108},[794,798,803],{"type":606,"tag":636,"props":795,"children":796},{"style":651},[797],{"type":612,"value":654},{"type":606,"tag":636,"props":799,"children":800},{"style":657},[801],{"type":612,"value":802}," say_hello",{"type":606,"tag":636,"props":804,"children":805},{"style":663},[806],{"type":612,"value":684},{"type":606,"tag":636,"props":808,"children":809},{"class":638,"line":117},[810,815,819,824],{"type":606,"tag":636,"props":811,"children":812},{"style":690},[813],{"type":612,"value":814},"    print",{"type":606,"tag":636,"props":816,"children":817},{"style":663},[818],{"type":612,"value":698},{"type":606,"tag":636,"props":820,"children":821},{"style":701},[822],{"type":612,"value":823},"\"Hello, World!\"",{"type":606,"tag":636,"props":825,"children":826},{"style":663},[827],{"type":612,"value":709},{"type":606,"tag":636,"props":829,"children":830},{"class":638,"line":126},[831,835],{"type":606,"tag":636,"props":832,"children":833},{"style":651},[834],{"type":612,"value":768},{"type":606,"tag":636,"props":836,"children":837},{"style":701},[838],{"type":612,"value":839}," \"Done\"\n",{"type":606,"tag":636,"props":841,"children":842},{"class":638,"line":135},[843],{"type":606,"tag":636,"props":844,"children":845},{"emptyLinePlaceholder":13},[846],{"type":612,"value":782},{"type":606,"tag":636,"props":848,"children":849},{"class":638,"line":144},[850],{"type":606,"tag":636,"props":851,"children":852},{"style":642},[853],{"type":612,"value":854},"# Using the decorated function\n",{"type":606,"tag":636,"props":856,"children":857},{"class":638,"line":153},[858,863,867],{"type":606,"tag":636,"props":859,"children":860},{"style":663},[861],{"type":612,"value":862},"result ",{"type":606,"tag":636,"props":864,"children":865},{"style":651},[866],{"type":612,"value":722},{"type":606,"tag":636,"props":868,"children":869},{"style":663},[870],{"type":612,"value":871}," say_hello()\n",{"type":606,"tag":873,"props":874,"children":876},"h2",{"id":875},"understanding-decorators",[877],{"type":612,"value":878},"🎯 Understanding Decorators",{"type":606,"tag":615,"props":880,"children":881},{},[882],{"type":612,"value":883},"Decorators are functions that take another function as input and return a modified version of that function.",{"type":606,"tag":885,"props":886,"children":890},"info-box",{"emoji":887,"title":888,"type":889},"🔧","Decorator Basics","info",[891,900,925,933,972,980],{"type":606,"tag":615,"props":892,"children":893},{},[894],{"type":606,"tag":895,"props":896,"children":897},"strong",{},[898],{"type":612,"value":899},"How Decorators Work:",{"type":606,"tag":901,"props":902,"children":903},"ol",{},[904,910,915,920],{"type":606,"tag":905,"props":906,"children":907},"li",{},[908],{"type":612,"value":909},"Take a function as input",{"type":606,"tag":905,"props":911,"children":912},{},[913],{"type":612,"value":914},"Create a wrapper function",{"type":606,"tag":905,"props":916,"children":917},{},[918],{"type":612,"value":919},"Add extra functionality in the wrapper",{"type":606,"tag":905,"props":921,"children":922},{},[923],{"type":612,"value":924},"Return the wrapper function",{"type":606,"tag":615,"props":926,"children":927},{},[928],{"type":606,"tag":895,"props":929,"children":930},{},[931],{"type":612,"value":932},"Syntax:",{"type":606,"tag":625,"props":934,"children":936},{"className":627,"code":935,"language":629,"meta":8,"style":8},"@decorator_name\ndef function_name():\n    pass\n",[937],{"type":606,"tag":632,"props":938,"children":939},{"__ignoreMap":8},[940,948,964],{"type":606,"tag":636,"props":941,"children":942},{"class":638,"line":12},[943],{"type":606,"tag":636,"props":944,"children":945},{"style":657},[946],{"type":612,"value":947},"@decorator_name\n",{"type":606,"tag":636,"props":949,"children":950},{"class":638,"line":27},[951,955,960],{"type":606,"tag":636,"props":952,"children":953},{"style":651},[954],{"type":612,"value":654},{"type":606,"tag":636,"props":956,"children":957},{"style":657},[958],{"type":612,"value":959}," function_name",{"type":606,"tag":636,"props":961,"children":962},{"style":663},[963],{"type":612,"value":684},{"type":606,"tag":636,"props":965,"children":966},{"class":638,"line":36},[967],{"type":606,"tag":636,"props":968,"children":969},{"style":651},[970],{"type":612,"value":971},"    pass\n",{"type":606,"tag":615,"props":973,"children":974},{},[975],{"type":606,"tag":895,"props":976,"children":977},{},[978],{"type":612,"value":979},"Equivalent to:",{"type":606,"tag":625,"props":981,"children":983},{"className":627,"code":982,"language":629,"meta":8,"style":8},"def function_name():\n    pass\nfunction_name = decorator_name(function_name)\n",[984],{"type":606,"tag":632,"props":985,"children":986},{"__ignoreMap":8},[987,1002,1009],{"type":606,"tag":636,"props":988,"children":989},{"class":638,"line":12},[990,994,998],{"type":606,"tag":636,"props":991,"children":992},{"style":651},[993],{"type":612,"value":654},{"type":606,"tag":636,"props":995,"children":996},{"style":657},[997],{"type":612,"value":959},{"type":606,"tag":636,"props":999,"children":1000},{"style":663},[1001],{"type":612,"value":684},{"type":606,"tag":636,"props":1003,"children":1004},{"class":638,"line":27},[1005],{"type":606,"tag":636,"props":1006,"children":1007},{"style":651},[1008],{"type":612,"value":971},{"type":606,"tag":636,"props":1010,"children":1011},{"class":638,"line":36},[1012,1017,1021],{"type":606,"tag":636,"props":1013,"children":1014},{"style":663},[1015],{"type":612,"value":1016},"function_name ",{"type":606,"tag":636,"props":1018,"children":1019},{"style":651},[1020],{"type":612,"value":722},{"type":606,"tag":636,"props":1022,"children":1023},{"style":663},[1024],{"type":612,"value":1025}," decorator_name(function_name)\n",{"type":606,"tag":1027,"props":1028,"children":1030},"h3",{"id":1029},"simple-decorator-examples",[1031],{"type":612,"value":1032},"Simple Decorator Examples",{"type":606,"tag":621,"props":1034,"children":1035},{},[1036],{"type":606,"tag":625,"props":1037,"children":1039},{"className":627,"code":1038,"language":629,"meta":8,"style":8},"# Timing decorator\nimport time\n\ndef timer(func):\n    def wrapper(*args, **kwargs):\n        start_time = time.time()\n        result = func(*args, **kwargs)\n        end_time = time.time()\n        print(f\"{func.__name__} took {end_time - start_time:.4f} seconds\")\n        return result\n    return wrapper\n\n@timer\ndef slow_function():\n    time.sleep(1)\n    return \"Finished sleeping\"\n\n@timer\ndef quick_function():\n    return sum(range(1000))\n\n# Test the decorated functions\nresult1 = slow_function()\nresult2 = quick_function()\n",[1040],{"type":606,"tag":632,"props":1041,"children":1042},{"__ignoreMap":8},[1043,1051,1064,1071,1087,1122,1139,1172,1188,1267,1278,1289,1296,1304,1320,1337,1349,1356,1363,1379,1414,1421,1429,1446],{"type":606,"tag":636,"props":1044,"children":1045},{"class":638,"line":12},[1046],{"type":606,"tag":636,"props":1047,"children":1048},{"style":642},[1049],{"type":612,"value":1050},"# Timing decorator\n",{"type":606,"tag":636,"props":1052,"children":1053},{"class":638,"line":27},[1054,1059],{"type":606,"tag":636,"props":1055,"children":1056},{"style":651},[1057],{"type":612,"value":1058},"import",{"type":606,"tag":636,"props":1060,"children":1061},{"style":663},[1062],{"type":612,"value":1063}," time\n",{"type":606,"tag":636,"props":1065,"children":1066},{"class":638,"line":36},[1067],{"type":606,"tag":636,"props":1068,"children":1069},{"emptyLinePlaceholder":13},[1070],{"type":612,"value":782},{"type":606,"tag":636,"props":1072,"children":1073},{"class":638,"line":45},[1074,1078,1083],{"type":606,"tag":636,"props":1075,"children":1076},{"style":651},[1077],{"type":612,"value":654},{"type":606,"tag":636,"props":1079,"children":1080},{"style":657},[1081],{"type":612,"value":1082}," timer",{"type":606,"tag":636,"props":1084,"children":1085},{"style":663},[1086],{"type":612,"value":666},{"type":606,"tag":636,"props":1088,"children":1089},{"class":638,"line":54},[1090,1094,1098,1102,1107,1112,1117],{"type":606,"tag":636,"props":1091,"children":1092},{"style":651},[1093],{"type":612,"value":674},{"type":606,"tag":636,"props":1095,"children":1096},{"style":657},[1097],{"type":612,"value":679},{"type":606,"tag":636,"props":1099,"children":1100},{"style":663},[1101],{"type":612,"value":698},{"type":606,"tag":636,"props":1103,"children":1104},{"style":651},[1105],{"type":612,"value":1106},"*",{"type":606,"tag":636,"props":1108,"children":1109},{"style":663},[1110],{"type":612,"value":1111},"args, ",{"type":606,"tag":636,"props":1113,"children":1114},{"style":651},[1115],{"type":612,"value":1116},"**",{"type":606,"tag":636,"props":1118,"children":1119},{"style":663},[1120],{"type":612,"value":1121},"kwargs):\n",{"type":606,"tag":636,"props":1123,"children":1124},{"class":638,"line":63},[1125,1130,1134],{"type":606,"tag":636,"props":1126,"children":1127},{"style":663},[1128],{"type":612,"value":1129},"        start_time ",{"type":606,"tag":636,"props":1131,"children":1132},{"style":651},[1133],{"type":612,"value":722},{"type":606,"tag":636,"props":1135,"children":1136},{"style":663},[1137],{"type":612,"value":1138}," time.time()\n",{"type":606,"tag":636,"props":1140,"children":1141},{"class":638,"line":72},[1142,1146,1150,1155,1159,1163,1167],{"type":606,"tag":636,"props":1143,"children":1144},{"style":663},[1145],{"type":612,"value":717},{"type":606,"tag":636,"props":1147,"children":1148},{"style":651},[1149],{"type":612,"value":722},{"type":606,"tag":636,"props":1151,"children":1152},{"style":663},[1153],{"type":612,"value":1154}," func(",{"type":606,"tag":636,"props":1156,"children":1157},{"style":651},[1158],{"type":612,"value":1106},{"type":606,"tag":636,"props":1160,"children":1161},{"style":663},[1162],{"type":612,"value":1111},{"type":606,"tag":636,"props":1164,"children":1165},{"style":651},[1166],{"type":612,"value":1116},{"type":606,"tag":636,"props":1168,"children":1169},{"style":663},[1170],{"type":612,"value":1171},"kwargs)\n",{"type":606,"tag":636,"props":1173,"children":1174},{"class":638,"line":81},[1175,1180,1184],{"type":606,"tag":636,"props":1176,"children":1177},{"style":663},[1178],{"type":612,"value":1179},"        end_time ",{"type":606,"tag":636,"props":1181,"children":1182},{"style":651},[1183],{"type":612,"value":722},{"type":606,"tag":636,"props":1185,"children":1186},{"style":663},[1187],{"type":612,"value":1138},{"type":606,"tag":636,"props":1189,"children":1190},{"class":638,"line":776},[1191,1195,1199,1204,1209,1214,1219,1224,1229,1233,1238,1243,1248,1253,1258,1263],{"type":606,"tag":636,"props":1192,"children":1193},{"style":690},[1194],{"type":612,"value":693},{"type":606,"tag":636,"props":1196,"children":1197},{"style":663},[1198],{"type":612,"value":698},{"type":606,"tag":636,"props":1200,"children":1201},{"style":651},[1202],{"type":612,"value":1203},"f",{"type":606,"tag":636,"props":1205,"children":1206},{"style":701},[1207],{"type":612,"value":1208},"\"",{"type":606,"tag":636,"props":1210,"children":1211},{"style":690},[1212],{"type":612,"value":1213},"{",{"type":606,"tag":636,"props":1215,"children":1216},{"style":663},[1217],{"type":612,"value":1218},"func.",{"type":606,"tag":636,"props":1220,"children":1221},{"style":690},[1222],{"type":612,"value":1223},"__name__}",{"type":606,"tag":636,"props":1225,"children":1226},{"style":701},[1227],{"type":612,"value":1228}," took ",{"type":606,"tag":636,"props":1230,"children":1231},{"style":690},[1232],{"type":612,"value":1213},{"type":606,"tag":636,"props":1234,"children":1235},{"style":663},[1236],{"type":612,"value":1237},"end_time ",{"type":606,"tag":636,"props":1239,"children":1240},{"style":651},[1241],{"type":612,"value":1242},"-",{"type":606,"tag":636,"props":1244,"children":1245},{"style":663},[1246],{"type":612,"value":1247}," start_time",{"type":606,"tag":636,"props":1249,"children":1250},{"style":651},[1251],{"type":612,"value":1252},":.4f",{"type":606,"tag":636,"props":1254,"children":1255},{"style":690},[1256],{"type":612,"value":1257},"}",{"type":606,"tag":636,"props":1259,"children":1260},{"style":701},[1261],{"type":612,"value":1262}," seconds\"",{"type":606,"tag":636,"props":1264,"children":1265},{"style":663},[1266],{"type":612,"value":709},{"type":606,"tag":636,"props":1268,"children":1269},{"class":638,"line":99},[1270,1274],{"type":606,"tag":636,"props":1271,"children":1272},{"style":651},[1273],{"type":612,"value":755},{"type":606,"tag":636,"props":1275,"children":1276},{"style":663},[1277],{"type":612,"value":760},{"type":606,"tag":636,"props":1279,"children":1280},{"class":638,"line":108},[1281,1285],{"type":606,"tag":636,"props":1282,"children":1283},{"style":651},[1284],{"type":612,"value":768},{"type":606,"tag":636,"props":1286,"children":1287},{"style":663},[1288],{"type":612,"value":773},{"type":606,"tag":636,"props":1290,"children":1291},{"class":638,"line":117},[1292],{"type":606,"tag":636,"props":1293,"children":1294},{"emptyLinePlaceholder":13},[1295],{"type":612,"value":782},{"type":606,"tag":636,"props":1297,"children":1298},{"class":638,"line":126},[1299],{"type":606,"tag":636,"props":1300,"children":1301},{"style":657},[1302],{"type":612,"value":1303},"@timer\n",{"type":606,"tag":636,"props":1305,"children":1306},{"class":638,"line":135},[1307,1311,1316],{"type":606,"tag":636,"props":1308,"children":1309},{"style":651},[1310],{"type":612,"value":654},{"type":606,"tag":636,"props":1312,"children":1313},{"style":657},[1314],{"type":612,"value":1315}," slow_function",{"type":606,"tag":636,"props":1317,"children":1318},{"style":663},[1319],{"type":612,"value":684},{"type":606,"tag":636,"props":1321,"children":1322},{"class":638,"line":144},[1323,1328,1333],{"type":606,"tag":636,"props":1324,"children":1325},{"style":663},[1326],{"type":612,"value":1327},"    time.sleep(",{"type":606,"tag":636,"props":1329,"children":1330},{"style":690},[1331],{"type":612,"value":1332},"1",{"type":606,"tag":636,"props":1334,"children":1335},{"style":663},[1336],{"type":612,"value":709},{"type":606,"tag":636,"props":1338,"children":1339},{"class":638,"line":153},[1340,1344],{"type":606,"tag":636,"props":1341,"children":1342},{"style":651},[1343],{"type":612,"value":768},{"type":606,"tag":636,"props":1345,"children":1346},{"style":701},[1347],{"type":612,"value":1348}," \"Finished sleeping\"\n",{"type":606,"tag":636,"props":1350,"children":1351},{"class":638,"line":163},[1352],{"type":606,"tag":636,"props":1353,"children":1354},{"emptyLinePlaceholder":13},[1355],{"type":612,"value":782},{"type":606,"tag":636,"props":1357,"children":1358},{"class":638,"line":172},[1359],{"type":606,"tag":636,"props":1360,"children":1361},{"style":657},[1362],{"type":612,"value":1303},{"type":606,"tag":636,"props":1364,"children":1365},{"class":638,"line":181},[1366,1370,1375],{"type":606,"tag":636,"props":1367,"children":1368},{"style":651},[1369],{"type":612,"value":654},{"type":606,"tag":636,"props":1371,"children":1372},{"style":657},[1373],{"type":612,"value":1374}," quick_function",{"type":606,"tag":636,"props":1376,"children":1377},{"style":663},[1378],{"type":612,"value":684},{"type":606,"tag":636,"props":1380,"children":1381},{"class":638,"line":190},[1382,1386,1391,1395,1400,1404,1409],{"type":606,"tag":636,"props":1383,"children":1384},{"style":651},[1385],{"type":612,"value":768},{"type":606,"tag":636,"props":1387,"children":1388},{"style":690},[1389],{"type":612,"value":1390}," sum",{"type":606,"tag":636,"props":1392,"children":1393},{"style":663},[1394],{"type":612,"value":698},{"type":606,"tag":636,"props":1396,"children":1397},{"style":690},[1398],{"type":612,"value":1399},"range",{"type":606,"tag":636,"props":1401,"children":1402},{"style":663},[1403],{"type":612,"value":698},{"type":606,"tag":636,"props":1405,"children":1406},{"style":690},[1407],{"type":612,"value":1408},"1000",{"type":606,"tag":636,"props":1410,"children":1411},{"style":663},[1412],{"type":612,"value":1413},"))\n",{"type":606,"tag":636,"props":1415,"children":1416},{"class":638,"line":199},[1417],{"type":606,"tag":636,"props":1418,"children":1419},{"emptyLinePlaceholder":13},[1420],{"type":612,"value":782},{"type":606,"tag":636,"props":1422,"children":1423},{"class":638,"line":208},[1424],{"type":606,"tag":636,"props":1425,"children":1426},{"style":642},[1427],{"type":612,"value":1428},"# Test the decorated functions\n",{"type":606,"tag":636,"props":1430,"children":1431},{"class":638,"line":217},[1432,1437,1441],{"type":606,"tag":636,"props":1433,"children":1434},{"style":663},[1435],{"type":612,"value":1436},"result1 ",{"type":606,"tag":636,"props":1438,"children":1439},{"style":651},[1440],{"type":612,"value":722},{"type":606,"tag":636,"props":1442,"children":1443},{"style":663},[1444],{"type":612,"value":1445}," slow_function()\n",{"type":606,"tag":636,"props":1447,"children":1448},{"class":638,"line":227},[1449,1454,1458],{"type":606,"tag":636,"props":1450,"children":1451},{"style":663},[1452],{"type":612,"value":1453},"result2 ",{"type":606,"tag":636,"props":1455,"children":1456},{"style":651},[1457],{"type":612,"value":722},{"type":606,"tag":636,"props":1459,"children":1460},{"style":663},[1461],{"type":612,"value":1462}," quick_function()\n",{"type":606,"tag":1027,"props":1464,"children":1466},{"id":1465},"logging-decorator",[1467],{"type":612,"value":1468},"Logging Decorator",{"type":606,"tag":621,"props":1470,"children":1471},{},[1472],{"type":606,"tag":625,"props":1473,"children":1475},{"className":627,"code":1474,"language":629,"meta":8,"style":8},"def log_calls(func):\n    def wrapper(*args, **kwargs):\n        print(f\"Calling function: {func.__name__}\")\n        print(f\"Arguments: args={args}, kwargs={kwargs}\")\n        result = func(*args, **kwargs)\n        print(f\"Function returned: {result}\")\n        return result\n    return wrapper\n\n@log_calls\ndef add_numbers(a, b):\n    return a + b\n\n@log_calls\ndef greet(name, greeting=\"Hello\"):\n    return f\"{greeting}, {name}!\"\n\n# Test the decorated functions\nsum_result = add_numbers(5, 3)\nmessage = greet(\"Alice\", greeting=\"Hi\")\n",[1476],{"type":606,"tag":632,"props":1477,"children":1478},{"__ignoreMap":8},[1479,1495,1526,1566,1625,1656,1697,1708,1719,1726,1734,1751,1773,1780,1787,1818,1870,1877,1884,1919],{"type":606,"tag":636,"props":1480,"children":1481},{"class":638,"line":12},[1482,1486,1491],{"type":606,"tag":636,"props":1483,"children":1484},{"style":651},[1485],{"type":612,"value":654},{"type":606,"tag":636,"props":1487,"children":1488},{"style":657},[1489],{"type":612,"value":1490}," log_calls",{"type":606,"tag":636,"props":1492,"children":1493},{"style":663},[1494],{"type":612,"value":666},{"type":606,"tag":636,"props":1496,"children":1497},{"class":638,"line":27},[1498,1502,1506,1510,1514,1518,1522],{"type":606,"tag":636,"props":1499,"children":1500},{"style":651},[1501],{"type":612,"value":674},{"type":606,"tag":636,"props":1503,"children":1504},{"style":657},[1505],{"type":612,"value":679},{"type":606,"tag":636,"props":1507,"children":1508},{"style":663},[1509],{"type":612,"value":698},{"type":606,"tag":636,"props":1511,"children":1512},{"style":651},[1513],{"type":612,"value":1106},{"type":606,"tag":636,"props":1515,"children":1516},{"style":663},[1517],{"type":612,"value":1111},{"type":606,"tag":636,"props":1519,"children":1520},{"style":651},[1521],{"type":612,"value":1116},{"type":606,"tag":636,"props":1523,"children":1524},{"style":663},[1525],{"type":612,"value":1121},{"type":606,"tag":636,"props":1527,"children":1528},{"class":638,"line":36},[1529,1533,1537,1541,1546,1550,1554,1558,1562],{"type":606,"tag":636,"props":1530,"children":1531},{"style":690},[1532],{"type":612,"value":693},{"type":606,"tag":636,"props":1534,"children":1535},{"style":663},[1536],{"type":612,"value":698},{"type":606,"tag":636,"props":1538,"children":1539},{"style":651},[1540],{"type":612,"value":1203},{"type":606,"tag":636,"props":1542,"children":1543},{"style":701},[1544],{"type":612,"value":1545},"\"Calling function: ",{"type":606,"tag":636,"props":1547,"children":1548},{"style":690},[1549],{"type":612,"value":1213},{"type":606,"tag":636,"props":1551,"children":1552},{"style":663},[1553],{"type":612,"value":1218},{"type":606,"tag":636,"props":1555,"children":1556},{"style":690},[1557],{"type":612,"value":1223},{"type":606,"tag":636,"props":1559,"children":1560},{"style":701},[1561],{"type":612,"value":1208},{"type":606,"tag":636,"props":1563,"children":1564},{"style":663},[1565],{"type":612,"value":709},{"type":606,"tag":636,"props":1567,"children":1568},{"class":638,"line":45},[1569,1573,1577,1581,1586,1590,1595,1599,1604,1608,1613,1617,1621],{"type":606,"tag":636,"props":1570,"children":1571},{"style":690},[1572],{"type":612,"value":693},{"type":606,"tag":636,"props":1574,"children":1575},{"style":663},[1576],{"type":612,"value":698},{"type":606,"tag":636,"props":1578,"children":1579},{"style":651},[1580],{"type":612,"value":1203},{"type":606,"tag":636,"props":1582,"children":1583},{"style":701},[1584],{"type":612,"value":1585},"\"Arguments: args=",{"type":606,"tag":636,"props":1587,"children":1588},{"style":690},[1589],{"type":612,"value":1213},{"type":606,"tag":636,"props":1591,"children":1592},{"style":663},[1593],{"type":612,"value":1594},"args",{"type":606,"tag":636,"props":1596,"children":1597},{"style":690},[1598],{"type":612,"value":1257},{"type":606,"tag":636,"props":1600,"children":1601},{"style":701},[1602],{"type":612,"value":1603},", kwargs=",{"type":606,"tag":636,"props":1605,"children":1606},{"style":690},[1607],{"type":612,"value":1213},{"type":606,"tag":636,"props":1609,"children":1610},{"style":663},[1611],{"type":612,"value":1612},"kwargs",{"type":606,"tag":636,"props":1614,"children":1615},{"style":690},[1616],{"type":612,"value":1257},{"type":606,"tag":636,"props":1618,"children":1619},{"style":701},[1620],{"type":612,"value":1208},{"type":606,"tag":636,"props":1622,"children":1623},{"style":663},[1624],{"type":612,"value":709},{"type":606,"tag":636,"props":1626,"children":1627},{"class":638,"line":54},[1628,1632,1636,1640,1644,1648,1652],{"type":606,"tag":636,"props":1629,"children":1630},{"style":663},[1631],{"type":612,"value":717},{"type":606,"tag":636,"props":1633,"children":1634},{"style":651},[1635],{"type":612,"value":722},{"type":606,"tag":636,"props":1637,"children":1638},{"style":663},[1639],{"type":612,"value":1154},{"type":606,"tag":636,"props":1641,"children":1642},{"style":651},[1643],{"type":612,"value":1106},{"type":606,"tag":636,"props":1645,"children":1646},{"style":663},[1647],{"type":612,"value":1111},{"type":606,"tag":636,"props":1649,"children":1650},{"style":651},[1651],{"type":612,"value":1116},{"type":606,"tag":636,"props":1653,"children":1654},{"style":663},[1655],{"type":612,"value":1171},{"type":606,"tag":636,"props":1657,"children":1658},{"class":638,"line":63},[1659,1663,1667,1671,1676,1680,1685,1689,1693],{"type":606,"tag":636,"props":1660,"children":1661},{"style":690},[1662],{"type":612,"value":693},{"type":606,"tag":636,"props":1664,"children":1665},{"style":663},[1666],{"type":612,"value":698},{"type":606,"tag":636,"props":1668,"children":1669},{"style":651},[1670],{"type":612,"value":1203},{"type":606,"tag":636,"props":1672,"children":1673},{"style":701},[1674],{"type":612,"value":1675},"\"Function returned: ",{"type":606,"tag":636,"props":1677,"children":1678},{"style":690},[1679],{"type":612,"value":1213},{"type":606,"tag":636,"props":1681,"children":1682},{"style":663},[1683],{"type":612,"value":1684},"result",{"type":606,"tag":636,"props":1686,"children":1687},{"style":690},[1688],{"type":612,"value":1257},{"type":606,"tag":636,"props":1690,"children":1691},{"style":701},[1692],{"type":612,"value":1208},{"type":606,"tag":636,"props":1694,"children":1695},{"style":663},[1696],{"type":612,"value":709},{"type":606,"tag":636,"props":1698,"children":1699},{"class":638,"line":72},[1700,1704],{"type":606,"tag":636,"props":1701,"children":1702},{"style":651},[1703],{"type":612,"value":755},{"type":606,"tag":636,"props":1705,"children":1706},{"style":663},[1707],{"type":612,"value":760},{"type":606,"tag":636,"props":1709,"children":1710},{"class":638,"line":81},[1711,1715],{"type":606,"tag":636,"props":1712,"children":1713},{"style":651},[1714],{"type":612,"value":768},{"type":606,"tag":636,"props":1716,"children":1717},{"style":663},[1718],{"type":612,"value":773},{"type":606,"tag":636,"props":1720,"children":1721},{"class":638,"line":776},[1722],{"type":606,"tag":636,"props":1723,"children":1724},{"emptyLinePlaceholder":13},[1725],{"type":612,"value":782},{"type":606,"tag":636,"props":1727,"children":1728},{"class":638,"line":99},[1729],{"type":606,"tag":636,"props":1730,"children":1731},{"style":657},[1732],{"type":612,"value":1733},"@log_calls\n",{"type":606,"tag":636,"props":1735,"children":1736},{"class":638,"line":108},[1737,1741,1746],{"type":606,"tag":636,"props":1738,"children":1739},{"style":651},[1740],{"type":612,"value":654},{"type":606,"tag":636,"props":1742,"children":1743},{"style":657},[1744],{"type":612,"value":1745}," add_numbers",{"type":606,"tag":636,"props":1747,"children":1748},{"style":663},[1749],{"type":612,"value":1750},"(a, b):\n",{"type":606,"tag":636,"props":1752,"children":1753},{"class":638,"line":117},[1754,1758,1763,1768],{"type":606,"tag":636,"props":1755,"children":1756},{"style":651},[1757],{"type":612,"value":768},{"type":606,"tag":636,"props":1759,"children":1760},{"style":663},[1761],{"type":612,"value":1762}," a ",{"type":606,"tag":636,"props":1764,"children":1765},{"style":651},[1766],{"type":612,"value":1767},"+",{"type":606,"tag":636,"props":1769,"children":1770},{"style":663},[1771],{"type":612,"value":1772}," b\n",{"type":606,"tag":636,"props":1774,"children":1775},{"class":638,"line":126},[1776],{"type":606,"tag":636,"props":1777,"children":1778},{"emptyLinePlaceholder":13},[1779],{"type":612,"value":782},{"type":606,"tag":636,"props":1781,"children":1782},{"class":638,"line":135},[1783],{"type":606,"tag":636,"props":1784,"children":1785},{"style":657},[1786],{"type":612,"value":1733},{"type":606,"tag":636,"props":1788,"children":1789},{"class":638,"line":144},[1790,1794,1799,1804,1808,1813],{"type":606,"tag":636,"props":1791,"children":1792},{"style":651},[1793],{"type":612,"value":654},{"type":606,"tag":636,"props":1795,"children":1796},{"style":657},[1797],{"type":612,"value":1798}," greet",{"type":606,"tag":636,"props":1800,"children":1801},{"style":663},[1802],{"type":612,"value":1803},"(name, greeting",{"type":606,"tag":636,"props":1805,"children":1806},{"style":651},[1807],{"type":612,"value":722},{"type":606,"tag":636,"props":1809,"children":1810},{"style":701},[1811],{"type":612,"value":1812},"\"Hello\"",{"type":606,"tag":636,"props":1814,"children":1815},{"style":663},[1816],{"type":612,"value":1817},"):\n",{"type":606,"tag":636,"props":1819,"children":1820},{"class":638,"line":153},[1821,1825,1830,1834,1838,1843,1847,1852,1856,1861,1865],{"type":606,"tag":636,"props":1822,"children":1823},{"style":651},[1824],{"type":612,"value":768},{"type":606,"tag":636,"props":1826,"children":1827},{"style":651},[1828],{"type":612,"value":1829}," f",{"type":606,"tag":636,"props":1831,"children":1832},{"style":701},[1833],{"type":612,"value":1208},{"type":606,"tag":636,"props":1835,"children":1836},{"style":690},[1837],{"type":612,"value":1213},{"type":606,"tag":636,"props":1839,"children":1840},{"style":663},[1841],{"type":612,"value":1842},"greeting",{"type":606,"tag":636,"props":1844,"children":1845},{"style":690},[1846],{"type":612,"value":1257},{"type":606,"tag":636,"props":1848,"children":1849},{"style":701},[1850],{"type":612,"value":1851},", ",{"type":606,"tag":636,"props":1853,"children":1854},{"style":690},[1855],{"type":612,"value":1213},{"type":606,"tag":636,"props":1857,"children":1858},{"style":663},[1859],{"type":612,"value":1860},"name",{"type":606,"tag":636,"props":1862,"children":1863},{"style":690},[1864],{"type":612,"value":1257},{"type":606,"tag":636,"props":1866,"children":1867},{"style":701},[1868],{"type":612,"value":1869},"!\"\n",{"type":606,"tag":636,"props":1871,"children":1872},{"class":638,"line":163},[1873],{"type":606,"tag":636,"props":1874,"children":1875},{"emptyLinePlaceholder":13},[1876],{"type":612,"value":782},{"type":606,"tag":636,"props":1878,"children":1879},{"class":638,"line":172},[1880],{"type":606,"tag":636,"props":1881,"children":1882},{"style":642},[1883],{"type":612,"value":1428},{"type":606,"tag":636,"props":1885,"children":1886},{"class":638,"line":181},[1887,1892,1896,1901,1906,1910,1915],{"type":606,"tag":636,"props":1888,"children":1889},{"style":663},[1890],{"type":612,"value":1891},"sum_result ",{"type":606,"tag":636,"props":1893,"children":1894},{"style":651},[1895],{"type":612,"value":722},{"type":606,"tag":636,"props":1897,"children":1898},{"style":663},[1899],{"type":612,"value":1900}," add_numbers(",{"type":606,"tag":636,"props":1902,"children":1903},{"style":690},[1904],{"type":612,"value":1905},"5",{"type":606,"tag":636,"props":1907,"children":1908},{"style":663},[1909],{"type":612,"value":1851},{"type":606,"tag":636,"props":1911,"children":1912},{"style":690},[1913],{"type":612,"value":1914},"3",{"type":606,"tag":636,"props":1916,"children":1917},{"style":663},[1918],{"type":612,"value":709},{"type":606,"tag":636,"props":1920,"children":1921},{"class":638,"line":190},[1922,1927,1931,1936,1941,1945,1950,1954,1959],{"type":606,"tag":636,"props":1923,"children":1924},{"style":663},[1925],{"type":612,"value":1926},"message ",{"type":606,"tag":636,"props":1928,"children":1929},{"style":651},[1930],{"type":612,"value":722},{"type":606,"tag":636,"props":1932,"children":1933},{"style":663},[1934],{"type":612,"value":1935}," greet(",{"type":606,"tag":636,"props":1937,"children":1938},{"style":701},[1939],{"type":612,"value":1940},"\"Alice\"",{"type":606,"tag":636,"props":1942,"children":1943},{"style":663},[1944],{"type":612,"value":1851},{"type":606,"tag":636,"props":1946,"children":1948},{"style":1947},"--shiki-default:#E36209;--shiki-app-dark-mode:#FFAB70",[1949],{"type":612,"value":1842},{"type":606,"tag":636,"props":1951,"children":1952},{"style":651},[1953],{"type":612,"value":722},{"type":606,"tag":636,"props":1955,"children":1956},{"style":701},[1957],{"type":612,"value":1958},"\"Hi\"",{"type":606,"tag":636,"props":1960,"children":1961},{"style":663},[1962],{"type":612,"value":709},{"type":606,"tag":873,"props":1964,"children":1966},{"id":1965},"decorator-types-reference",[1967],{"type":612,"value":1968},"📋 Decorator Types Reference",{"type":606,"tag":1970,"props":1971,"children":1972},"table",{},[1973,1997],{"type":606,"tag":1974,"props":1975,"children":1976},"thead",{},[1977],{"type":606,"tag":1978,"props":1979,"children":1980},"tr",{},[1981,1987,1992],{"type":606,"tag":1982,"props":1983,"children":1984},"th",{},[1985],{"type":612,"value":1986},"Type",{"type":606,"tag":1982,"props":1988,"children":1989},{},[1990],{"type":612,"value":1991},"Purpose",{"type":606,"tag":1982,"props":1993,"children":1994},{},[1995],{"type":612,"value":1996},"Example Use Case",{"type":606,"tag":1998,"props":1999,"children":2000},"tbody",{},[2001,2020,2038,2056],{"type":606,"tag":1978,"props":2002,"children":2003},{},[2004,2010,2015],{"type":606,"tag":2005,"props":2006,"children":2007},"td",{},[2008],{"type":612,"value":2009},"Simple",{"type":606,"tag":2005,"props":2011,"children":2012},{},[2013],{"type":612,"value":2014},"Basic functionality",{"type":606,"tag":2005,"props":2016,"children":2017},{},[2018],{"type":612,"value":2019},"Logging, timing",{"type":606,"tag":1978,"props":2021,"children":2022},{},[2023,2028,2033],{"type":606,"tag":2005,"props":2024,"children":2025},{},[2026],{"type":612,"value":2027},"With arguments",{"type":606,"tag":2005,"props":2029,"children":2030},{},[2031],{"type":612,"value":2032},"Configurable behavior",{"type":606,"tag":2005,"props":2034,"children":2035},{},[2036],{"type":612,"value":2037},"Rate limiting, retries",{"type":606,"tag":1978,"props":2039,"children":2040},{},[2041,2046,2051],{"type":606,"tag":2005,"props":2042,"children":2043},{},[2044],{"type":612,"value":2045},"Class-based",{"type":606,"tag":2005,"props":2047,"children":2048},{},[2049],{"type":612,"value":2050},"Complex state",{"type":606,"tag":2005,"props":2052,"children":2053},{},[2054],{"type":612,"value":2055},"Caching, counters",{"type":606,"tag":1978,"props":2057,"children":2058},{},[2059,2064,2069],{"type":606,"tag":2005,"props":2060,"children":2061},{},[2062],{"type":612,"value":2063},"Built-in",{"type":606,"tag":2005,"props":2065,"children":2066},{},[2067],{"type":612,"value":2068},"Python features",{"type":606,"tag":2005,"props":2070,"children":2071},{},[2072,2078,2079],{"type":606,"tag":632,"props":2073,"children":2075},{"className":2074},[],[2076],{"type":612,"value":2077},"@property",{"type":612,"value":1851},{"type":606,"tag":632,"props":2080,"children":2082},{"className":2081},[],[2083],{"type":612,"value":2084},"@staticmethod",{"type":606,"tag":873,"props":2086,"children":2088},{"id":2087},"decorators-with-arguments",[2089],{"type":612,"value":2090},"🔧 Decorators with Arguments",{"type":606,"tag":1027,"props":2092,"children":2094},{"id":2093},"parameterized-decorators",[2095],{"type":612,"value":2096},"Parameterized Decorators",{"type":606,"tag":621,"props":2098,"children":2099},{},[2100],{"type":606,"tag":625,"props":2101,"children":2103},{"className":627,"code":2102,"language":629,"meta":8,"style":8},"def repeat(times):\n    def decorator(func):\n        def wrapper(*args, **kwargs):\n            for i in range(times):\n                result = func(*args, **kwargs)\n            return result\n        return wrapper\n    return decorator\n\ndef validate_types(**expected_types):\n    def decorator(func):\n        def wrapper(*args, **kwargs):\n            # Simple type checking\n            for key, expected_type in expected_types.items():\n                if key in kwargs:\n                    if not isinstance(kwargs[key], expected_type):\n                        raise TypeError(f\"{key} must be {expected_type.__name__}\")\n            return func(*args, **kwargs)\n        return wrapper\n    return decorator\n\n# Using parameterized decorators\n@repeat(3)\ndef say_hi():\n    print(\"Hi there!\")\n\n@validate_types(name=str, age=int)\ndef create_user(name, age):\n    return {\"name\": name, \"age\": age}\n\n# Test the functions\nsay_hi()  # Prints \"Hi there!\" 3 times\n\nuser = create_user(name=\"Alice\", age=30)  # Works\n# user = create_user(name=\"Alice\", age=\"30\")  # Would raise TypeError\n",[2104],{"type":606,"tag":632,"props":2105,"children":2106},{"__ignoreMap":8},[2107,2124,2140,2172,2199,2231,2243,2254,2266,2273,2298,2313,2344,2352,2373,2395,2418,2482,2509,2520,2531,2538,2546,2566,2582,2602,2609,2656,2673,2705,2712,2720,2733,2740,2796],{"type":606,"tag":636,"props":2108,"children":2109},{"class":638,"line":12},[2110,2114,2119],{"type":606,"tag":636,"props":2111,"children":2112},{"style":651},[2113],{"type":612,"value":654},{"type":606,"tag":636,"props":2115,"children":2116},{"style":657},[2117],{"type":612,"value":2118}," repeat",{"type":606,"tag":636,"props":2120,"children":2121},{"style":663},[2122],{"type":612,"value":2123},"(times):\n",{"type":606,"tag":636,"props":2125,"children":2126},{"class":638,"line":27},[2127,2131,2136],{"type":606,"tag":636,"props":2128,"children":2129},{"style":651},[2130],{"type":612,"value":674},{"type":606,"tag":636,"props":2132,"children":2133},{"style":657},[2134],{"type":612,"value":2135}," decorator",{"type":606,"tag":636,"props":2137,"children":2138},{"style":663},[2139],{"type":612,"value":666},{"type":606,"tag":636,"props":2141,"children":2142},{"class":638,"line":36},[2143,2148,2152,2156,2160,2164,2168],{"type":606,"tag":636,"props":2144,"children":2145},{"style":651},[2146],{"type":612,"value":2147},"        def",{"type":606,"tag":636,"props":2149,"children":2150},{"style":657},[2151],{"type":612,"value":679},{"type":606,"tag":636,"props":2153,"children":2154},{"style":663},[2155],{"type":612,"value":698},{"type":606,"tag":636,"props":2157,"children":2158},{"style":651},[2159],{"type":612,"value":1106},{"type":606,"tag":636,"props":2161,"children":2162},{"style":663},[2163],{"type":612,"value":1111},{"type":606,"tag":636,"props":2165,"children":2166},{"style":651},[2167],{"type":612,"value":1116},{"type":606,"tag":636,"props":2169,"children":2170},{"style":663},[2171],{"type":612,"value":1121},{"type":606,"tag":636,"props":2173,"children":2174},{"class":638,"line":45},[2175,2180,2185,2190,2195],{"type":606,"tag":636,"props":2176,"children":2177},{"style":651},[2178],{"type":612,"value":2179},"            for",{"type":606,"tag":636,"props":2181,"children":2182},{"style":663},[2183],{"type":612,"value":2184}," i ",{"type":606,"tag":636,"props":2186,"children":2187},{"style":651},[2188],{"type":612,"value":2189},"in",{"type":606,"tag":636,"props":2191,"children":2192},{"style":690},[2193],{"type":612,"value":2194}," range",{"type":606,"tag":636,"props":2196,"children":2197},{"style":663},[2198],{"type":612,"value":2123},{"type":606,"tag":636,"props":2200,"children":2201},{"class":638,"line":54},[2202,2207,2211,2215,2219,2223,2227],{"type":606,"tag":636,"props":2203,"children":2204},{"style":663},[2205],{"type":612,"value":2206},"                result ",{"type":606,"tag":636,"props":2208,"children":2209},{"style":651},[2210],{"type":612,"value":722},{"type":606,"tag":636,"props":2212,"children":2213},{"style":663},[2214],{"type":612,"value":1154},{"type":606,"tag":636,"props":2216,"children":2217},{"style":651},[2218],{"type":612,"value":1106},{"type":606,"tag":636,"props":2220,"children":2221},{"style":663},[2222],{"type":612,"value":1111},{"type":606,"tag":636,"props":2224,"children":2225},{"style":651},[2226],{"type":612,"value":1116},{"type":606,"tag":636,"props":2228,"children":2229},{"style":663},[2230],{"type":612,"value":1171},{"type":606,"tag":636,"props":2232,"children":2233},{"class":638,"line":63},[2234,2239],{"type":606,"tag":636,"props":2235,"children":2236},{"style":651},[2237],{"type":612,"value":2238},"            return",{"type":606,"tag":636,"props":2240,"children":2241},{"style":663},[2242],{"type":612,"value":760},{"type":606,"tag":636,"props":2244,"children":2245},{"class":638,"line":72},[2246,2250],{"type":606,"tag":636,"props":2247,"children":2248},{"style":651},[2249],{"type":612,"value":755},{"type":606,"tag":636,"props":2251,"children":2252},{"style":663},[2253],{"type":612,"value":773},{"type":606,"tag":636,"props":2255,"children":2256},{"class":638,"line":81},[2257,2261],{"type":606,"tag":636,"props":2258,"children":2259},{"style":651},[2260],{"type":612,"value":768},{"type":606,"tag":636,"props":2262,"children":2263},{"style":663},[2264],{"type":612,"value":2265}," decorator\n",{"type":606,"tag":636,"props":2267,"children":2268},{"class":638,"line":776},[2269],{"type":606,"tag":636,"props":2270,"children":2271},{"emptyLinePlaceholder":13},[2272],{"type":612,"value":782},{"type":606,"tag":636,"props":2274,"children":2275},{"class":638,"line":99},[2276,2280,2285,2289,2293],{"type":606,"tag":636,"props":2277,"children":2278},{"style":651},[2279],{"type":612,"value":654},{"type":606,"tag":636,"props":2281,"children":2282},{"style":657},[2283],{"type":612,"value":2284}," validate_types",{"type":606,"tag":636,"props":2286,"children":2287},{"style":663},[2288],{"type":612,"value":698},{"type":606,"tag":636,"props":2290,"children":2291},{"style":651},[2292],{"type":612,"value":1116},{"type":606,"tag":636,"props":2294,"children":2295},{"style":663},[2296],{"type":612,"value":2297},"expected_types):\n",{"type":606,"tag":636,"props":2299,"children":2300},{"class":638,"line":108},[2301,2305,2309],{"type":606,"tag":636,"props":2302,"children":2303},{"style":651},[2304],{"type":612,"value":674},{"type":606,"tag":636,"props":2306,"children":2307},{"style":657},[2308],{"type":612,"value":2135},{"type":606,"tag":636,"props":2310,"children":2311},{"style":663},[2312],{"type":612,"value":666},{"type":606,"tag":636,"props":2314,"children":2315},{"class":638,"line":117},[2316,2320,2324,2328,2332,2336,2340],{"type":606,"tag":636,"props":2317,"children":2318},{"style":651},[2319],{"type":612,"value":2147},{"type":606,"tag":636,"props":2321,"children":2322},{"style":657},[2323],{"type":612,"value":679},{"type":606,"tag":636,"props":2325,"children":2326},{"style":663},[2327],{"type":612,"value":698},{"type":606,"tag":636,"props":2329,"children":2330},{"style":651},[2331],{"type":612,"value":1106},{"type":606,"tag":636,"props":2333,"children":2334},{"style":663},[2335],{"type":612,"value":1111},{"type":606,"tag":636,"props":2337,"children":2338},{"style":651},[2339],{"type":612,"value":1116},{"type":606,"tag":636,"props":2341,"children":2342},{"style":663},[2343],{"type":612,"value":1121},{"type":606,"tag":636,"props":2345,"children":2346},{"class":638,"line":126},[2347],{"type":606,"tag":636,"props":2348,"children":2349},{"style":642},[2350],{"type":612,"value":2351},"            # Simple type checking\n",{"type":606,"tag":636,"props":2353,"children":2354},{"class":638,"line":135},[2355,2359,2364,2368],{"type":606,"tag":636,"props":2356,"children":2357},{"style":651},[2358],{"type":612,"value":2179},{"type":606,"tag":636,"props":2360,"children":2361},{"style":663},[2362],{"type":612,"value":2363}," key, expected_type ",{"type":606,"tag":636,"props":2365,"children":2366},{"style":651},[2367],{"type":612,"value":2189},{"type":606,"tag":636,"props":2369,"children":2370},{"style":663},[2371],{"type":612,"value":2372}," expected_types.items():\n",{"type":606,"tag":636,"props":2374,"children":2375},{"class":638,"line":144},[2376,2381,2386,2390],{"type":606,"tag":636,"props":2377,"children":2378},{"style":651},[2379],{"type":612,"value":2380},"                if",{"type":606,"tag":636,"props":2382,"children":2383},{"style":663},[2384],{"type":612,"value":2385}," key ",{"type":606,"tag":636,"props":2387,"children":2388},{"style":651},[2389],{"type":612,"value":2189},{"type":606,"tag":636,"props":2391,"children":2392},{"style":663},[2393],{"type":612,"value":2394}," kwargs:\n",{"type":606,"tag":636,"props":2396,"children":2397},{"class":638,"line":153},[2398,2403,2408,2413],{"type":606,"tag":636,"props":2399,"children":2400},{"style":651},[2401],{"type":612,"value":2402},"                    if",{"type":606,"tag":636,"props":2404,"children":2405},{"style":651},[2406],{"type":612,"value":2407}," not",{"type":606,"tag":636,"props":2409,"children":2410},{"style":690},[2411],{"type":612,"value":2412}," isinstance",{"type":606,"tag":636,"props":2414,"children":2415},{"style":663},[2416],{"type":612,"value":2417},"(kwargs[key], expected_type):\n",{"type":606,"tag":636,"props":2419,"children":2420},{"class":638,"line":163},[2421,2426,2431,2435,2439,2443,2447,2452,2456,2461,2465,2470,2474,2478],{"type":606,"tag":636,"props":2422,"children":2423},{"style":651},[2424],{"type":612,"value":2425},"                        raise",{"type":606,"tag":636,"props":2427,"children":2428},{"style":690},[2429],{"type":612,"value":2430}," TypeError",{"type":606,"tag":636,"props":2432,"children":2433},{"style":663},[2434],{"type":612,"value":698},{"type":606,"tag":636,"props":2436,"children":2437},{"style":651},[2438],{"type":612,"value":1203},{"type":606,"tag":636,"props":2440,"children":2441},{"style":701},[2442],{"type":612,"value":1208},{"type":606,"tag":636,"props":2444,"children":2445},{"style":690},[2446],{"type":612,"value":1213},{"type":606,"tag":636,"props":2448,"children":2449},{"style":663},[2450],{"type":612,"value":2451},"key",{"type":606,"tag":636,"props":2453,"children":2454},{"style":690},[2455],{"type":612,"value":1257},{"type":606,"tag":636,"props":2457,"children":2458},{"style":701},[2459],{"type":612,"value":2460}," must be ",{"type":606,"tag":636,"props":2462,"children":2463},{"style":690},[2464],{"type":612,"value":1213},{"type":606,"tag":636,"props":2466,"children":2467},{"style":663},[2468],{"type":612,"value":2469},"expected_type.",{"type":606,"tag":636,"props":2471,"children":2472},{"style":690},[2473],{"type":612,"value":1223},{"type":606,"tag":636,"props":2475,"children":2476},{"style":701},[2477],{"type":612,"value":1208},{"type":606,"tag":636,"props":2479,"children":2480},{"style":663},[2481],{"type":612,"value":709},{"type":606,"tag":636,"props":2483,"children":2484},{"class":638,"line":172},[2485,2489,2493,2497,2501,2505],{"type":606,"tag":636,"props":2486,"children":2487},{"style":651},[2488],{"type":612,"value":2238},{"type":606,"tag":636,"props":2490,"children":2491},{"style":663},[2492],{"type":612,"value":1154},{"type":606,"tag":636,"props":2494,"children":2495},{"style":651},[2496],{"type":612,"value":1106},{"type":606,"tag":636,"props":2498,"children":2499},{"style":663},[2500],{"type":612,"value":1111},{"type":606,"tag":636,"props":2502,"children":2503},{"style":651},[2504],{"type":612,"value":1116},{"type":606,"tag":636,"props":2506,"children":2507},{"style":663},[2508],{"type":612,"value":1171},{"type":606,"tag":636,"props":2510,"children":2511},{"class":638,"line":181},[2512,2516],{"type":606,"tag":636,"props":2513,"children":2514},{"style":651},[2515],{"type":612,"value":755},{"type":606,"tag":636,"props":2517,"children":2518},{"style":663},[2519],{"type":612,"value":773},{"type":606,"tag":636,"props":2521,"children":2522},{"class":638,"line":190},[2523,2527],{"type":606,"tag":636,"props":2524,"children":2525},{"style":651},[2526],{"type":612,"value":768},{"type":606,"tag":636,"props":2528,"children":2529},{"style":663},[2530],{"type":612,"value":2265},{"type":606,"tag":636,"props":2532,"children":2533},{"class":638,"line":199},[2534],{"type":606,"tag":636,"props":2535,"children":2536},{"emptyLinePlaceholder":13},[2537],{"type":612,"value":782},{"type":606,"tag":636,"props":2539,"children":2540},{"class":638,"line":208},[2541],{"type":606,"tag":636,"props":2542,"children":2543},{"style":642},[2544],{"type":612,"value":2545},"# Using parameterized decorators\n",{"type":606,"tag":636,"props":2547,"children":2548},{"class":638,"line":217},[2549,2554,2558,2562],{"type":606,"tag":636,"props":2550,"children":2551},{"style":657},[2552],{"type":612,"value":2553},"@repeat",{"type":606,"tag":636,"props":2555,"children":2556},{"style":663},[2557],{"type":612,"value":698},{"type":606,"tag":636,"props":2559,"children":2560},{"style":690},[2561],{"type":612,"value":1914},{"type":606,"tag":636,"props":2563,"children":2564},{"style":663},[2565],{"type":612,"value":709},{"type":606,"tag":636,"props":2567,"children":2568},{"class":638,"line":227},[2569,2573,2578],{"type":606,"tag":636,"props":2570,"children":2571},{"style":651},[2572],{"type":612,"value":654},{"type":606,"tag":636,"props":2574,"children":2575},{"style":657},[2576],{"type":612,"value":2577}," say_hi",{"type":606,"tag":636,"props":2579,"children":2580},{"style":663},[2581],{"type":612,"value":684},{"type":606,"tag":636,"props":2583,"children":2584},{"class":638,"line":236},[2585,2589,2593,2598],{"type":606,"tag":636,"props":2586,"children":2587},{"style":690},[2588],{"type":612,"value":814},{"type":606,"tag":636,"props":2590,"children":2591},{"style":663},[2592],{"type":612,"value":698},{"type":606,"tag":636,"props":2594,"children":2595},{"style":701},[2596],{"type":612,"value":2597},"\"Hi there!\"",{"type":606,"tag":636,"props":2599,"children":2600},{"style":663},[2601],{"type":612,"value":709},{"type":606,"tag":636,"props":2603,"children":2604},{"class":638,"line":245},[2605],{"type":606,"tag":636,"props":2606,"children":2607},{"emptyLinePlaceholder":13},[2608],{"type":612,"value":782},{"type":606,"tag":636,"props":2610,"children":2611},{"class":638,"line":254},[2612,2617,2621,2625,2629,2634,2638,2643,2647,2652],{"type":606,"tag":636,"props":2613,"children":2614},{"style":657},[2615],{"type":612,"value":2616},"@validate_types",{"type":606,"tag":636,"props":2618,"children":2619},{"style":663},[2620],{"type":612,"value":698},{"type":606,"tag":636,"props":2622,"children":2623},{"style":1947},[2624],{"type":612,"value":1860},{"type":606,"tag":636,"props":2626,"children":2627},{"style":651},[2628],{"type":612,"value":722},{"type":606,"tag":636,"props":2630,"children":2631},{"style":690},[2632],{"type":612,"value":2633},"str",{"type":606,"tag":636,"props":2635,"children":2636},{"style":663},[2637],{"type":612,"value":1851},{"type":606,"tag":636,"props":2639,"children":2640},{"style":1947},[2641],{"type":612,"value":2642},"age",{"type":606,"tag":636,"props":2644,"children":2645},{"style":651},[2646],{"type":612,"value":722},{"type":606,"tag":636,"props":2648,"children":2649},{"style":690},[2650],{"type":612,"value":2651},"int",{"type":606,"tag":636,"props":2653,"children":2654},{"style":663},[2655],{"type":612,"value":709},{"type":606,"tag":636,"props":2657,"children":2658},{"class":638,"line":263},[2659,2663,2668],{"type":606,"tag":636,"props":2660,"children":2661},{"style":651},[2662],{"type":612,"value":654},{"type":606,"tag":636,"props":2664,"children":2665},{"style":657},[2666],{"type":612,"value":2667}," create_user",{"type":606,"tag":636,"props":2669,"children":2670},{"style":663},[2671],{"type":612,"value":2672},"(name, age):\n",{"type":606,"tag":636,"props":2674,"children":2675},{"class":638,"line":272},[2676,2680,2685,2690,2695,2700],{"type":606,"tag":636,"props":2677,"children":2678},{"style":651},[2679],{"type":612,"value":768},{"type":606,"tag":636,"props":2681,"children":2682},{"style":663},[2683],{"type":612,"value":2684}," {",{"type":606,"tag":636,"props":2686,"children":2687},{"style":701},[2688],{"type":612,"value":2689},"\"name\"",{"type":606,"tag":636,"props":2691,"children":2692},{"style":663},[2693],{"type":612,"value":2694},": name, ",{"type":606,"tag":636,"props":2696,"children":2697},{"style":701},[2698],{"type":612,"value":2699},"\"age\"",{"type":606,"tag":636,"props":2701,"children":2702},{"style":663},[2703],{"type":612,"value":2704},": age}\n",{"type":606,"tag":636,"props":2706,"children":2707},{"class":638,"line":281},[2708],{"type":606,"tag":636,"props":2709,"children":2710},{"emptyLinePlaceholder":13},[2711],{"type":612,"value":782},{"type":606,"tag":636,"props":2713,"children":2714},{"class":638,"line":291},[2715],{"type":606,"tag":636,"props":2716,"children":2717},{"style":642},[2718],{"type":612,"value":2719},"# Test the functions\n",{"type":606,"tag":636,"props":2721,"children":2722},{"class":638,"line":302},[2723,2728],{"type":606,"tag":636,"props":2724,"children":2725},{"style":663},[2726],{"type":612,"value":2727},"say_hi()  ",{"type":606,"tag":636,"props":2729,"children":2730},{"style":642},[2731],{"type":612,"value":2732},"# Prints \"Hi there!\" 3 times\n",{"type":606,"tag":636,"props":2734,"children":2735},{"class":638,"line":311},[2736],{"type":606,"tag":636,"props":2737,"children":2738},{"emptyLinePlaceholder":13},[2739],{"type":612,"value":782},{"type":606,"tag":636,"props":2741,"children":2742},{"class":638,"line":320},[2743,2748,2752,2757,2761,2765,2769,2773,2777,2781,2786,2791],{"type":606,"tag":636,"props":2744,"children":2745},{"style":663},[2746],{"type":612,"value":2747},"user ",{"type":606,"tag":636,"props":2749,"children":2750},{"style":651},[2751],{"type":612,"value":722},{"type":606,"tag":636,"props":2753,"children":2754},{"style":663},[2755],{"type":612,"value":2756}," create_user(",{"type":606,"tag":636,"props":2758,"children":2759},{"style":1947},[2760],{"type":612,"value":1860},{"type":606,"tag":636,"props":2762,"children":2763},{"style":651},[2764],{"type":612,"value":722},{"type":606,"tag":636,"props":2766,"children":2767},{"style":701},[2768],{"type":612,"value":1940},{"type":606,"tag":636,"props":2770,"children":2771},{"style":663},[2772],{"type":612,"value":1851},{"type":606,"tag":636,"props":2774,"children":2775},{"style":1947},[2776],{"type":612,"value":2642},{"type":606,"tag":636,"props":2778,"children":2779},{"style":651},[2780],{"type":612,"value":722},{"type":606,"tag":636,"props":2782,"children":2783},{"style":690},[2784],{"type":612,"value":2785},"30",{"type":606,"tag":636,"props":2787,"children":2788},{"style":663},[2789],{"type":612,"value":2790},")  ",{"type":606,"tag":636,"props":2792,"children":2793},{"style":642},[2794],{"type":612,"value":2795},"# Works\n",{"type":606,"tag":636,"props":2797,"children":2798},{"class":638,"line":329},[2799],{"type":606,"tag":636,"props":2800,"children":2801},{"style":642},[2802],{"type":612,"value":2803},"# user = create_user(name=\"Alice\", age=\"30\")  # Would raise TypeError\n",{"type":606,"tag":1027,"props":2805,"children":2807},{"id":2806},"conditional-decorator",[2808],{"type":612,"value":2809},"Conditional Decorator",{"type":606,"tag":621,"props":2811,"children":2812},{},[2813],{"type":606,"tag":625,"props":2814,"children":2816},{"className":627,"code":2815,"language":629,"meta":8,"style":8},"def debug_mode(enabled=True):\n    def decorator(func):\n        def wrapper(*args, **kwargs):\n            if enabled:\n                print(f\"DEBUG: Calling {func.__name__} with args={args}, kwargs={kwargs}\")\n            result = func(*args, **kwargs)\n            if enabled:\n                print(f\"DEBUG: {func.__name__} returned {result}\")\n            return result\n        return wrapper\n    return decorator\n\n# Toggle debug mode\n@debug_mode(enabled=True)\ndef calculate(x, y, operation=\"add\"):\n    if operation == \"add\":\n        return x + y\n    elif operation == \"multiply\":\n        return x * y\n    return None\n\n@debug_mode(enabled=False)\ndef silent_function(value):\n    return value * 2\n\n# Test functions\nresult1 = calculate(5, 3)\nresult2 = calculate(4, 7, operation=\"multiply\")\nresult3 = silent_function(10)\n",[2817],{"type":606,"tag":632,"props":2818,"children":2819},{"__ignoreMap":8},[2820,2850,2865,2896,2909,2983,3015,3026,3083,3094,3105,3116,3123,3131,3160,3190,3218,3239,3264,3283,3295,3302,3330,3347,3368,3375,3383,3415,3466],{"type":606,"tag":636,"props":2821,"children":2822},{"class":638,"line":12},[2823,2827,2832,2837,2841,2846],{"type":606,"tag":636,"props":2824,"children":2825},{"style":651},[2826],{"type":612,"value":654},{"type":606,"tag":636,"props":2828,"children":2829},{"style":657},[2830],{"type":612,"value":2831}," debug_mode",{"type":606,"tag":636,"props":2833,"children":2834},{"style":663},[2835],{"type":612,"value":2836},"(enabled",{"type":606,"tag":636,"props":2838,"children":2839},{"style":651},[2840],{"type":612,"value":722},{"type":606,"tag":636,"props":2842,"children":2843},{"style":690},[2844],{"type":612,"value":2845},"True",{"type":606,"tag":636,"props":2847,"children":2848},{"style":663},[2849],{"type":612,"value":1817},{"type":606,"tag":636,"props":2851,"children":2852},{"class":638,"line":27},[2853,2857,2861],{"type":606,"tag":636,"props":2854,"children":2855},{"style":651},[2856],{"type":612,"value":674},{"type":606,"tag":636,"props":2858,"children":2859},{"style":657},[2860],{"type":612,"value":2135},{"type":606,"tag":636,"props":2862,"children":2863},{"style":663},[2864],{"type":612,"value":666},{"type":606,"tag":636,"props":2866,"children":2867},{"class":638,"line":36},[2868,2872,2876,2880,2884,2888,2892],{"type":606,"tag":636,"props":2869,"children":2870},{"style":651},[2871],{"type":612,"value":2147},{"type":606,"tag":636,"props":2873,"children":2874},{"style":657},[2875],{"type":612,"value":679},{"type":606,"tag":636,"props":2877,"children":2878},{"style":663},[2879],{"type":612,"value":698},{"type":606,"tag":636,"props":2881,"children":2882},{"style":651},[2883],{"type":612,"value":1106},{"type":606,"tag":636,"props":2885,"children":2886},{"style":663},[2887],{"type":612,"value":1111},{"type":606,"tag":636,"props":2889,"children":2890},{"style":651},[2891],{"type":612,"value":1116},{"type":606,"tag":636,"props":2893,"children":2894},{"style":663},[2895],{"type":612,"value":1121},{"type":606,"tag":636,"props":2897,"children":2898},{"class":638,"line":45},[2899,2904],{"type":606,"tag":636,"props":2900,"children":2901},{"style":651},[2902],{"type":612,"value":2903},"            if",{"type":606,"tag":636,"props":2905,"children":2906},{"style":663},[2907],{"type":612,"value":2908}," enabled:\n",{"type":606,"tag":636,"props":2910,"children":2911},{"class":638,"line":54},[2912,2917,2921,2925,2930,2934,2938,2942,2947,2951,2955,2959,2963,2967,2971,2975,2979],{"type":606,"tag":636,"props":2913,"children":2914},{"style":690},[2915],{"type":612,"value":2916},"                print",{"type":606,"tag":636,"props":2918,"children":2919},{"style":663},[2920],{"type":612,"value":698},{"type":606,"tag":636,"props":2922,"children":2923},{"style":651},[2924],{"type":612,"value":1203},{"type":606,"tag":636,"props":2926,"children":2927},{"style":701},[2928],{"type":612,"value":2929},"\"DEBUG: Calling ",{"type":606,"tag":636,"props":2931,"children":2932},{"style":690},[2933],{"type":612,"value":1213},{"type":606,"tag":636,"props":2935,"children":2936},{"style":663},[2937],{"type":612,"value":1218},{"type":606,"tag":636,"props":2939,"children":2940},{"style":690},[2941],{"type":612,"value":1223},{"type":606,"tag":636,"props":2943,"children":2944},{"style":701},[2945],{"type":612,"value":2946}," with args=",{"type":606,"tag":636,"props":2948,"children":2949},{"style":690},[2950],{"type":612,"value":1213},{"type":606,"tag":636,"props":2952,"children":2953},{"style":663},[2954],{"type":612,"value":1594},{"type":606,"tag":636,"props":2956,"children":2957},{"style":690},[2958],{"type":612,"value":1257},{"type":606,"tag":636,"props":2960,"children":2961},{"style":701},[2962],{"type":612,"value":1603},{"type":606,"tag":636,"props":2964,"children":2965},{"style":690},[2966],{"type":612,"value":1213},{"type":606,"tag":636,"props":2968,"children":2969},{"style":663},[2970],{"type":612,"value":1612},{"type":606,"tag":636,"props":2972,"children":2973},{"style":690},[2974],{"type":612,"value":1257},{"type":606,"tag":636,"props":2976,"children":2977},{"style":701},[2978],{"type":612,"value":1208},{"type":606,"tag":636,"props":2980,"children":2981},{"style":663},[2982],{"type":612,"value":709},{"type":606,"tag":636,"props":2984,"children":2985},{"class":638,"line":63},[2986,2991,2995,2999,3003,3007,3011],{"type":606,"tag":636,"props":2987,"children":2988},{"style":663},[2989],{"type":612,"value":2990},"            result ",{"type":606,"tag":636,"props":2992,"children":2993},{"style":651},[2994],{"type":612,"value":722},{"type":606,"tag":636,"props":2996,"children":2997},{"style":663},[2998],{"type":612,"value":1154},{"type":606,"tag":636,"props":3000,"children":3001},{"style":651},[3002],{"type":612,"value":1106},{"type":606,"tag":636,"props":3004,"children":3005},{"style":663},[3006],{"type":612,"value":1111},{"type":606,"tag":636,"props":3008,"children":3009},{"style":651},[3010],{"type":612,"value":1116},{"type":606,"tag":636,"props":3012,"children":3013},{"style":663},[3014],{"type":612,"value":1171},{"type":606,"tag":636,"props":3016,"children":3017},{"class":638,"line":72},[3018,3022],{"type":606,"tag":636,"props":3019,"children":3020},{"style":651},[3021],{"type":612,"value":2903},{"type":606,"tag":636,"props":3023,"children":3024},{"style":663},[3025],{"type":612,"value":2908},{"type":606,"tag":636,"props":3027,"children":3028},{"class":638,"line":81},[3029,3033,3037,3041,3046,3050,3054,3058,3063,3067,3071,3075,3079],{"type":606,"tag":636,"props":3030,"children":3031},{"style":690},[3032],{"type":612,"value":2916},{"type":606,"tag":636,"props":3034,"children":3035},{"style":663},[3036],{"type":612,"value":698},{"type":606,"tag":636,"props":3038,"children":3039},{"style":651},[3040],{"type":612,"value":1203},{"type":606,"tag":636,"props":3042,"children":3043},{"style":701},[3044],{"type":612,"value":3045},"\"DEBUG: ",{"type":606,"tag":636,"props":3047,"children":3048},{"style":690},[3049],{"type":612,"value":1213},{"type":606,"tag":636,"props":3051,"children":3052},{"style":663},[3053],{"type":612,"value":1218},{"type":606,"tag":636,"props":3055,"children":3056},{"style":690},[3057],{"type":612,"value":1223},{"type":606,"tag":636,"props":3059,"children":3060},{"style":701},[3061],{"type":612,"value":3062}," returned ",{"type":606,"tag":636,"props":3064,"children":3065},{"style":690},[3066],{"type":612,"value":1213},{"type":606,"tag":636,"props":3068,"children":3069},{"style":663},[3070],{"type":612,"value":1684},{"type":606,"tag":636,"props":3072,"children":3073},{"style":690},[3074],{"type":612,"value":1257},{"type":606,"tag":636,"props":3076,"children":3077},{"style":701},[3078],{"type":612,"value":1208},{"type":606,"tag":636,"props":3080,"children":3081},{"style":663},[3082],{"type":612,"value":709},{"type":606,"tag":636,"props":3084,"children":3085},{"class":638,"line":776},[3086,3090],{"type":606,"tag":636,"props":3087,"children":3088},{"style":651},[3089],{"type":612,"value":2238},{"type":606,"tag":636,"props":3091,"children":3092},{"style":663},[3093],{"type":612,"value":760},{"type":606,"tag":636,"props":3095,"children":3096},{"class":638,"line":99},[3097,3101],{"type":606,"tag":636,"props":3098,"children":3099},{"style":651},[3100],{"type":612,"value":755},{"type":606,"tag":636,"props":3102,"children":3103},{"style":663},[3104],{"type":612,"value":773},{"type":606,"tag":636,"props":3106,"children":3107},{"class":638,"line":108},[3108,3112],{"type":606,"tag":636,"props":3109,"children":3110},{"style":651},[3111],{"type":612,"value":768},{"type":606,"tag":636,"props":3113,"children":3114},{"style":663},[3115],{"type":612,"value":2265},{"type":606,"tag":636,"props":3117,"children":3118},{"class":638,"line":117},[3119],{"type":606,"tag":636,"props":3120,"children":3121},{"emptyLinePlaceholder":13},[3122],{"type":612,"value":782},{"type":606,"tag":636,"props":3124,"children":3125},{"class":638,"line":126},[3126],{"type":606,"tag":636,"props":3127,"children":3128},{"style":642},[3129],{"type":612,"value":3130},"# Toggle debug mode\n",{"type":606,"tag":636,"props":3132,"children":3133},{"class":638,"line":135},[3134,3139,3143,3148,3152,3156],{"type":606,"tag":636,"props":3135,"children":3136},{"style":657},[3137],{"type":612,"value":3138},"@debug_mode",{"type":606,"tag":636,"props":3140,"children":3141},{"style":663},[3142],{"type":612,"value":698},{"type":606,"tag":636,"props":3144,"children":3145},{"style":1947},[3146],{"type":612,"value":3147},"enabled",{"type":606,"tag":636,"props":3149,"children":3150},{"style":651},[3151],{"type":612,"value":722},{"type":606,"tag":636,"props":3153,"children":3154},{"style":690},[3155],{"type":612,"value":2845},{"type":606,"tag":636,"props":3157,"children":3158},{"style":663},[3159],{"type":612,"value":709},{"type":606,"tag":636,"props":3161,"children":3162},{"class":638,"line":144},[3163,3167,3172,3177,3181,3186],{"type":606,"tag":636,"props":3164,"children":3165},{"style":651},[3166],{"type":612,"value":654},{"type":606,"tag":636,"props":3168,"children":3169},{"style":657},[3170],{"type":612,"value":3171}," calculate",{"type":606,"tag":636,"props":3173,"children":3174},{"style":663},[3175],{"type":612,"value":3176},"(x, y, operation",{"type":606,"tag":636,"props":3178,"children":3179},{"style":651},[3180],{"type":612,"value":722},{"type":606,"tag":636,"props":3182,"children":3183},{"style":701},[3184],{"type":612,"value":3185},"\"add\"",{"type":606,"tag":636,"props":3187,"children":3188},{"style":663},[3189],{"type":612,"value":1817},{"type":606,"tag":636,"props":3191,"children":3192},{"class":638,"line":153},[3193,3198,3203,3208,3213],{"type":606,"tag":636,"props":3194,"children":3195},{"style":651},[3196],{"type":612,"value":3197},"    if",{"type":606,"tag":636,"props":3199,"children":3200},{"style":663},[3201],{"type":612,"value":3202}," operation ",{"type":606,"tag":636,"props":3204,"children":3205},{"style":651},[3206],{"type":612,"value":3207},"==",{"type":606,"tag":636,"props":3209,"children":3210},{"style":701},[3211],{"type":612,"value":3212}," \"add\"",{"type":606,"tag":636,"props":3214,"children":3215},{"style":663},[3216],{"type":612,"value":3217},":\n",{"type":606,"tag":636,"props":3219,"children":3220},{"class":638,"line":163},[3221,3225,3230,3234],{"type":606,"tag":636,"props":3222,"children":3223},{"style":651},[3224],{"type":612,"value":755},{"type":606,"tag":636,"props":3226,"children":3227},{"style":663},[3228],{"type":612,"value":3229}," x ",{"type":606,"tag":636,"props":3231,"children":3232},{"style":651},[3233],{"type":612,"value":1767},{"type":606,"tag":636,"props":3235,"children":3236},{"style":663},[3237],{"type":612,"value":3238}," y\n",{"type":606,"tag":636,"props":3240,"children":3241},{"class":638,"line":172},[3242,3247,3251,3255,3260],{"type":606,"tag":636,"props":3243,"children":3244},{"style":651},[3245],{"type":612,"value":3246},"    elif",{"type":606,"tag":636,"props":3248,"children":3249},{"style":663},[3250],{"type":612,"value":3202},{"type":606,"tag":636,"props":3252,"children":3253},{"style":651},[3254],{"type":612,"value":3207},{"type":606,"tag":636,"props":3256,"children":3257},{"style":701},[3258],{"type":612,"value":3259}," \"multiply\"",{"type":606,"tag":636,"props":3261,"children":3262},{"style":663},[3263],{"type":612,"value":3217},{"type":606,"tag":636,"props":3265,"children":3266},{"class":638,"line":181},[3267,3271,3275,3279],{"type":606,"tag":636,"props":3268,"children":3269},{"style":651},[3270],{"type":612,"value":755},{"type":606,"tag":636,"props":3272,"children":3273},{"style":663},[3274],{"type":612,"value":3229},{"type":606,"tag":636,"props":3276,"children":3277},{"style":651},[3278],{"type":612,"value":1106},{"type":606,"tag":636,"props":3280,"children":3281},{"style":663},[3282],{"type":612,"value":3238},{"type":606,"tag":636,"props":3284,"children":3285},{"class":638,"line":190},[3286,3290],{"type":606,"tag":636,"props":3287,"children":3288},{"style":651},[3289],{"type":612,"value":768},{"type":606,"tag":636,"props":3291,"children":3292},{"style":690},[3293],{"type":612,"value":3294}," None\n",{"type":606,"tag":636,"props":3296,"children":3297},{"class":638,"line":199},[3298],{"type":606,"tag":636,"props":3299,"children":3300},{"emptyLinePlaceholder":13},[3301],{"type":612,"value":782},{"type":606,"tag":636,"props":3303,"children":3304},{"class":638,"line":208},[3305,3309,3313,3317,3321,3326],{"type":606,"tag":636,"props":3306,"children":3307},{"style":657},[3308],{"type":612,"value":3138},{"type":606,"tag":636,"props":3310,"children":3311},{"style":663},[3312],{"type":612,"value":698},{"type":606,"tag":636,"props":3314,"children":3315},{"style":1947},[3316],{"type":612,"value":3147},{"type":606,"tag":636,"props":3318,"children":3319},{"style":651},[3320],{"type":612,"value":722},{"type":606,"tag":636,"props":3322,"children":3323},{"style":690},[3324],{"type":612,"value":3325},"False",{"type":606,"tag":636,"props":3327,"children":3328},{"style":663},[3329],{"type":612,"value":709},{"type":606,"tag":636,"props":3331,"children":3332},{"class":638,"line":217},[3333,3337,3342],{"type":606,"tag":636,"props":3334,"children":3335},{"style":651},[3336],{"type":612,"value":654},{"type":606,"tag":636,"props":3338,"children":3339},{"style":657},[3340],{"type":612,"value":3341}," silent_function",{"type":606,"tag":636,"props":3343,"children":3344},{"style":663},[3345],{"type":612,"value":3346},"(value):\n",{"type":606,"tag":636,"props":3348,"children":3349},{"class":638,"line":227},[3350,3354,3359,3363],{"type":606,"tag":636,"props":3351,"children":3352},{"style":651},[3353],{"type":612,"value":768},{"type":606,"tag":636,"props":3355,"children":3356},{"style":663},[3357],{"type":612,"value":3358}," value ",{"type":606,"tag":636,"props":3360,"children":3361},{"style":651},[3362],{"type":612,"value":1106},{"type":606,"tag":636,"props":3364,"children":3365},{"style":690},[3366],{"type":612,"value":3367}," 2\n",{"type":606,"tag":636,"props":3369,"children":3370},{"class":638,"line":236},[3371],{"type":606,"tag":636,"props":3372,"children":3373},{"emptyLinePlaceholder":13},[3374],{"type":612,"value":782},{"type":606,"tag":636,"props":3376,"children":3377},{"class":638,"line":245},[3378],{"type":606,"tag":636,"props":3379,"children":3380},{"style":642},[3381],{"type":612,"value":3382},"# Test functions\n",{"type":606,"tag":636,"props":3384,"children":3385},{"class":638,"line":254},[3386,3390,3394,3399,3403,3407,3411],{"type":606,"tag":636,"props":3387,"children":3388},{"style":663},[3389],{"type":612,"value":1436},{"type":606,"tag":636,"props":3391,"children":3392},{"style":651},[3393],{"type":612,"value":722},{"type":606,"tag":636,"props":3395,"children":3396},{"style":663},[3397],{"type":612,"value":3398}," calculate(",{"type":606,"tag":636,"props":3400,"children":3401},{"style":690},[3402],{"type":612,"value":1905},{"type":606,"tag":636,"props":3404,"children":3405},{"style":663},[3406],{"type":612,"value":1851},{"type":606,"tag":636,"props":3408,"children":3409},{"style":690},[3410],{"type":612,"value":1914},{"type":606,"tag":636,"props":3412,"children":3413},{"style":663},[3414],{"type":612,"value":709},{"type":606,"tag":636,"props":3416,"children":3417},{"class":638,"line":263},[3418,3422,3426,3430,3435,3439,3444,3448,3453,3457,3462],{"type":606,"tag":636,"props":3419,"children":3420},{"style":663},[3421],{"type":612,"value":1453},{"type":606,"tag":636,"props":3423,"children":3424},{"style":651},[3425],{"type":612,"value":722},{"type":606,"tag":636,"props":3427,"children":3428},{"style":663},[3429],{"type":612,"value":3398},{"type":606,"tag":636,"props":3431,"children":3432},{"style":690},[3433],{"type":612,"value":3434},"4",{"type":606,"tag":636,"props":3436,"children":3437},{"style":663},[3438],{"type":612,"value":1851},{"type":606,"tag":636,"props":3440,"children":3441},{"style":690},[3442],{"type":612,"value":3443},"7",{"type":606,"tag":636,"props":3445,"children":3446},{"style":663},[3447],{"type":612,"value":1851},{"type":606,"tag":636,"props":3449,"children":3450},{"style":1947},[3451],{"type":612,"value":3452},"operation",{"type":606,"tag":636,"props":3454,"children":3455},{"style":651},[3456],{"type":612,"value":722},{"type":606,"tag":636,"props":3458,"children":3459},{"style":701},[3460],{"type":612,"value":3461},"\"multiply\"",{"type":606,"tag":636,"props":3463,"children":3464},{"style":663},[3465],{"type":612,"value":709},{"type":606,"tag":636,"props":3467,"children":3468},{"class":638,"line":272},[3469,3474,3478,3483,3488],{"type":606,"tag":636,"props":3470,"children":3471},{"style":663},[3472],{"type":612,"value":3473},"result3 ",{"type":606,"tag":636,"props":3475,"children":3476},{"style":651},[3477],{"type":612,"value":722},{"type":606,"tag":636,"props":3479,"children":3480},{"style":663},[3481],{"type":612,"value":3482}," silent_function(",{"type":606,"tag":636,"props":3484,"children":3485},{"style":690},[3486],{"type":612,"value":3487},"10",{"type":606,"tag":636,"props":3489,"children":3490},{"style":663},[3491],{"type":612,"value":709},{"type":606,"tag":1027,"props":3493,"children":3495},{"id":3494},"error-handling-decorator",[3496],{"type":612,"value":3497},"Error Handling Decorator",{"type":606,"tag":621,"props":3499,"children":3500},{},[3501],{"type":606,"tag":625,"props":3502,"children":3504},{"className":627,"code":3503,"language":629,"meta":8,"style":8},"def handle_errors(default_return=None):\n    def decorator(func):\n        def wrapper(*args, **kwargs):\n            try:\n                return func(*args, **kwargs)\n            except Exception as e:\n                print(f\"Error in {func.__name__}: {e}\")\n                return default_return\n        return wrapper\n    return decorator\n\n@handle_errors(default_return=\"Error occurred\")\ndef divide_numbers(a, b):\n    return a / b\n\n@handle_errors(default_return=[])\ndef process_data(data):\n    return [x * 2 for x in data]\n\n# Test error handling\nresult1 = divide_numbers(10, 2)    # Normal: 5.0\nresult2 = divide_numbers(10, 0)    # Error: \"Error occurred\"\n\nresult3 = process_data([1, 2, 3])  # Normal: [2, 4, 6]\nresult4 = process_data(\"invalid\")  # Error: []\n",[3505],{"type":606,"tag":632,"props":3506,"children":3507},{"__ignoreMap":8},[3508,3538,3553,3584,3596,3624,3647,3705,3717,3728,3739,3746,3776,3792,3812,3819,3843,3860,3899,3906,3914,3953,3990,3997,4043],{"type":606,"tag":636,"props":3509,"children":3510},{"class":638,"line":12},[3511,3515,3520,3525,3529,3534],{"type":606,"tag":636,"props":3512,"children":3513},{"style":651},[3514],{"type":612,"value":654},{"type":606,"tag":636,"props":3516,"children":3517},{"style":657},[3518],{"type":612,"value":3519}," handle_errors",{"type":606,"tag":636,"props":3521,"children":3522},{"style":663},[3523],{"type":612,"value":3524},"(default_return",{"type":606,"tag":636,"props":3526,"children":3527},{"style":651},[3528],{"type":612,"value":722},{"type":606,"tag":636,"props":3530,"children":3531},{"style":690},[3532],{"type":612,"value":3533},"None",{"type":606,"tag":636,"props":3535,"children":3536},{"style":663},[3537],{"type":612,"value":1817},{"type":606,"tag":636,"props":3539,"children":3540},{"class":638,"line":27},[3541,3545,3549],{"type":606,"tag":636,"props":3542,"children":3543},{"style":651},[3544],{"type":612,"value":674},{"type":606,"tag":636,"props":3546,"children":3547},{"style":657},[3548],{"type":612,"value":2135},{"type":606,"tag":636,"props":3550,"children":3551},{"style":663},[3552],{"type":612,"value":666},{"type":606,"tag":636,"props":3554,"children":3555},{"class":638,"line":36},[3556,3560,3564,3568,3572,3576,3580],{"type":606,"tag":636,"props":3557,"children":3558},{"style":651},[3559],{"type":612,"value":2147},{"type":606,"tag":636,"props":3561,"children":3562},{"style":657},[3563],{"type":612,"value":679},{"type":606,"tag":636,"props":3565,"children":3566},{"style":663},[3567],{"type":612,"value":698},{"type":606,"tag":636,"props":3569,"children":3570},{"style":651},[3571],{"type":612,"value":1106},{"type":606,"tag":636,"props":3573,"children":3574},{"style":663},[3575],{"type":612,"value":1111},{"type":606,"tag":636,"props":3577,"children":3578},{"style":651},[3579],{"type":612,"value":1116},{"type":606,"tag":636,"props":3581,"children":3582},{"style":663},[3583],{"type":612,"value":1121},{"type":606,"tag":636,"props":3585,"children":3586},{"class":638,"line":45},[3587,3592],{"type":606,"tag":636,"props":3588,"children":3589},{"style":651},[3590],{"type":612,"value":3591},"            try",{"type":606,"tag":636,"props":3593,"children":3594},{"style":663},[3595],{"type":612,"value":3217},{"type":606,"tag":636,"props":3597,"children":3598},{"class":638,"line":54},[3599,3604,3608,3612,3616,3620],{"type":606,"tag":636,"props":3600,"children":3601},{"style":651},[3602],{"type":612,"value":3603},"                return",{"type":606,"tag":636,"props":3605,"children":3606},{"style":663},[3607],{"type":612,"value":1154},{"type":606,"tag":636,"props":3609,"children":3610},{"style":651},[3611],{"type":612,"value":1106},{"type":606,"tag":636,"props":3613,"children":3614},{"style":663},[3615],{"type":612,"value":1111},{"type":606,"tag":636,"props":3617,"children":3618},{"style":651},[3619],{"type":612,"value":1116},{"type":606,"tag":636,"props":3621,"children":3622},{"style":663},[3623],{"type":612,"value":1171},{"type":606,"tag":636,"props":3625,"children":3626},{"class":638,"line":63},[3627,3632,3637,3642],{"type":606,"tag":636,"props":3628,"children":3629},{"style":651},[3630],{"type":612,"value":3631},"            except",{"type":606,"tag":636,"props":3633,"children":3634},{"style":690},[3635],{"type":612,"value":3636}," Exception",{"type":606,"tag":636,"props":3638,"children":3639},{"style":651},[3640],{"type":612,"value":3641}," as",{"type":606,"tag":636,"props":3643,"children":3644},{"style":663},[3645],{"type":612,"value":3646}," e:\n",{"type":606,"tag":636,"props":3648,"children":3649},{"class":638,"line":72},[3650,3654,3658,3662,3667,3671,3675,3679,3684,3688,3693,3697,3701],{"type":606,"tag":636,"props":3651,"children":3652},{"style":690},[3653],{"type":612,"value":2916},{"type":606,"tag":636,"props":3655,"children":3656},{"style":663},[3657],{"type":612,"value":698},{"type":606,"tag":636,"props":3659,"children":3660},{"style":651},[3661],{"type":612,"value":1203},{"type":606,"tag":636,"props":3663,"children":3664},{"style":701},[3665],{"type":612,"value":3666},"\"Error in ",{"type":606,"tag":636,"props":3668,"children":3669},{"style":690},[3670],{"type":612,"value":1213},{"type":606,"tag":636,"props":3672,"children":3673},{"style":663},[3674],{"type":612,"value":1218},{"type":606,"tag":636,"props":3676,"children":3677},{"style":690},[3678],{"type":612,"value":1223},{"type":606,"tag":636,"props":3680,"children":3681},{"style":701},[3682],{"type":612,"value":3683},": ",{"type":606,"tag":636,"props":3685,"children":3686},{"style":690},[3687],{"type":612,"value":1213},{"type":606,"tag":636,"props":3689,"children":3690},{"style":663},[3691],{"type":612,"value":3692},"e",{"type":606,"tag":636,"props":3694,"children":3695},{"style":690},[3696],{"type":612,"value":1257},{"type":606,"tag":636,"props":3698,"children":3699},{"style":701},[3700],{"type":612,"value":1208},{"type":606,"tag":636,"props":3702,"children":3703},{"style":663},[3704],{"type":612,"value":709},{"type":606,"tag":636,"props":3706,"children":3707},{"class":638,"line":81},[3708,3712],{"type":606,"tag":636,"props":3709,"children":3710},{"style":651},[3711],{"type":612,"value":3603},{"type":606,"tag":636,"props":3713,"children":3714},{"style":663},[3715],{"type":612,"value":3716}," default_return\n",{"type":606,"tag":636,"props":3718,"children":3719},{"class":638,"line":776},[3720,3724],{"type":606,"tag":636,"props":3721,"children":3722},{"style":651},[3723],{"type":612,"value":755},{"type":606,"tag":636,"props":3725,"children":3726},{"style":663},[3727],{"type":612,"value":773},{"type":606,"tag":636,"props":3729,"children":3730},{"class":638,"line":99},[3731,3735],{"type":606,"tag":636,"props":3732,"children":3733},{"style":651},[3734],{"type":612,"value":768},{"type":606,"tag":636,"props":3736,"children":3737},{"style":663},[3738],{"type":612,"value":2265},{"type":606,"tag":636,"props":3740,"children":3741},{"class":638,"line":108},[3742],{"type":606,"tag":636,"props":3743,"children":3744},{"emptyLinePlaceholder":13},[3745],{"type":612,"value":782},{"type":606,"tag":636,"props":3747,"children":3748},{"class":638,"line":117},[3749,3754,3758,3763,3767,3772],{"type":606,"tag":636,"props":3750,"children":3751},{"style":657},[3752],{"type":612,"value":3753},"@handle_errors",{"type":606,"tag":636,"props":3755,"children":3756},{"style":663},[3757],{"type":612,"value":698},{"type":606,"tag":636,"props":3759,"children":3760},{"style":1947},[3761],{"type":612,"value":3762},"default_return",{"type":606,"tag":636,"props":3764,"children":3765},{"style":651},[3766],{"type":612,"value":722},{"type":606,"tag":636,"props":3768,"children":3769},{"style":701},[3770],{"type":612,"value":3771},"\"Error occurred\"",{"type":606,"tag":636,"props":3773,"children":3774},{"style":663},[3775],{"type":612,"value":709},{"type":606,"tag":636,"props":3777,"children":3778},{"class":638,"line":126},[3779,3783,3788],{"type":606,"tag":636,"props":3780,"children":3781},{"style":651},[3782],{"type":612,"value":654},{"type":606,"tag":636,"props":3784,"children":3785},{"style":657},[3786],{"type":612,"value":3787}," divide_numbers",{"type":606,"tag":636,"props":3789,"children":3790},{"style":663},[3791],{"type":612,"value":1750},{"type":606,"tag":636,"props":3793,"children":3794},{"class":638,"line":135},[3795,3799,3803,3808],{"type":606,"tag":636,"props":3796,"children":3797},{"style":651},[3798],{"type":612,"value":768},{"type":606,"tag":636,"props":3800,"children":3801},{"style":663},[3802],{"type":612,"value":1762},{"type":606,"tag":636,"props":3804,"children":3805},{"style":651},[3806],{"type":612,"value":3807},"/",{"type":606,"tag":636,"props":3809,"children":3810},{"style":663},[3811],{"type":612,"value":1772},{"type":606,"tag":636,"props":3813,"children":3814},{"class":638,"line":144},[3815],{"type":606,"tag":636,"props":3816,"children":3817},{"emptyLinePlaceholder":13},[3818],{"type":612,"value":782},{"type":606,"tag":636,"props":3820,"children":3821},{"class":638,"line":153},[3822,3826,3830,3834,3838],{"type":606,"tag":636,"props":3823,"children":3824},{"style":657},[3825],{"type":612,"value":3753},{"type":606,"tag":636,"props":3827,"children":3828},{"style":663},[3829],{"type":612,"value":698},{"type":606,"tag":636,"props":3831,"children":3832},{"style":1947},[3833],{"type":612,"value":3762},{"type":606,"tag":636,"props":3835,"children":3836},{"style":651},[3837],{"type":612,"value":722},{"type":606,"tag":636,"props":3839,"children":3840},{"style":663},[3841],{"type":612,"value":3842},"[])\n",{"type":606,"tag":636,"props":3844,"children":3845},{"class":638,"line":163},[3846,3850,3855],{"type":606,"tag":636,"props":3847,"children":3848},{"style":651},[3849],{"type":612,"value":654},{"type":606,"tag":636,"props":3851,"children":3852},{"style":657},[3853],{"type":612,"value":3854}," process_data",{"type":606,"tag":636,"props":3856,"children":3857},{"style":663},[3858],{"type":612,"value":3859},"(data):\n",{"type":606,"tag":636,"props":3861,"children":3862},{"class":638,"line":172},[3863,3867,3872,3876,3881,3886,3890,3894],{"type":606,"tag":636,"props":3864,"children":3865},{"style":651},[3866],{"type":612,"value":768},{"type":606,"tag":636,"props":3868,"children":3869},{"style":663},[3870],{"type":612,"value":3871}," [x ",{"type":606,"tag":636,"props":3873,"children":3874},{"style":651},[3875],{"type":612,"value":1106},{"type":606,"tag":636,"props":3877,"children":3878},{"style":690},[3879],{"type":612,"value":3880}," 2",{"type":606,"tag":636,"props":3882,"children":3883},{"style":651},[3884],{"type":612,"value":3885}," for",{"type":606,"tag":636,"props":3887,"children":3888},{"style":663},[3889],{"type":612,"value":3229},{"type":606,"tag":636,"props":3891,"children":3892},{"style":651},[3893],{"type":612,"value":2189},{"type":606,"tag":636,"props":3895,"children":3896},{"style":663},[3897],{"type":612,"value":3898}," data]\n",{"type":606,"tag":636,"props":3900,"children":3901},{"class":638,"line":181},[3902],{"type":606,"tag":636,"props":3903,"children":3904},{"emptyLinePlaceholder":13},[3905],{"type":612,"value":782},{"type":606,"tag":636,"props":3907,"children":3908},{"class":638,"line":190},[3909],{"type":606,"tag":636,"props":3910,"children":3911},{"style":642},[3912],{"type":612,"value":3913},"# Test error handling\n",{"type":606,"tag":636,"props":3915,"children":3916},{"class":638,"line":199},[3917,3921,3925,3930,3934,3938,3943,3948],{"type":606,"tag":636,"props":3918,"children":3919},{"style":663},[3920],{"type":612,"value":1436},{"type":606,"tag":636,"props":3922,"children":3923},{"style":651},[3924],{"type":612,"value":722},{"type":606,"tag":636,"props":3926,"children":3927},{"style":663},[3928],{"type":612,"value":3929}," divide_numbers(",{"type":606,"tag":636,"props":3931,"children":3932},{"style":690},[3933],{"type":612,"value":3487},{"type":606,"tag":636,"props":3935,"children":3936},{"style":663},[3937],{"type":612,"value":1851},{"type":606,"tag":636,"props":3939,"children":3940},{"style":690},[3941],{"type":612,"value":3942},"2",{"type":606,"tag":636,"props":3944,"children":3945},{"style":663},[3946],{"type":612,"value":3947},")    ",{"type":606,"tag":636,"props":3949,"children":3950},{"style":642},[3951],{"type":612,"value":3952},"# Normal: 5.0\n",{"type":606,"tag":636,"props":3954,"children":3955},{"class":638,"line":208},[3956,3960,3964,3968,3972,3976,3981,3985],{"type":606,"tag":636,"props":3957,"children":3958},{"style":663},[3959],{"type":612,"value":1453},{"type":606,"tag":636,"props":3961,"children":3962},{"style":651},[3963],{"type":612,"value":722},{"type":606,"tag":636,"props":3965,"children":3966},{"style":663},[3967],{"type":612,"value":3929},{"type":606,"tag":636,"props":3969,"children":3970},{"style":690},[3971],{"type":612,"value":3487},{"type":606,"tag":636,"props":3973,"children":3974},{"style":663},[3975],{"type":612,"value":1851},{"type":606,"tag":636,"props":3977,"children":3978},{"style":690},[3979],{"type":612,"value":3980},"0",{"type":606,"tag":636,"props":3982,"children":3983},{"style":663},[3984],{"type":612,"value":3947},{"type":606,"tag":636,"props":3986,"children":3987},{"style":642},[3988],{"type":612,"value":3989},"# Error: \"Error occurred\"\n",{"type":606,"tag":636,"props":3991,"children":3992},{"class":638,"line":217},[3993],{"type":606,"tag":636,"props":3994,"children":3995},{"emptyLinePlaceholder":13},[3996],{"type":612,"value":782},{"type":606,"tag":636,"props":3998,"children":3999},{"class":638,"line":227},[4000,4004,4008,4013,4017,4021,4025,4029,4033,4038],{"type":606,"tag":636,"props":4001,"children":4002},{"style":663},[4003],{"type":612,"value":3473},{"type":606,"tag":636,"props":4005,"children":4006},{"style":651},[4007],{"type":612,"value":722},{"type":606,"tag":636,"props":4009,"children":4010},{"style":663},[4011],{"type":612,"value":4012}," process_data([",{"type":606,"tag":636,"props":4014,"children":4015},{"style":690},[4016],{"type":612,"value":1332},{"type":606,"tag":636,"props":4018,"children":4019},{"style":663},[4020],{"type":612,"value":1851},{"type":606,"tag":636,"props":4022,"children":4023},{"style":690},[4024],{"type":612,"value":3942},{"type":606,"tag":636,"props":4026,"children":4027},{"style":663},[4028],{"type":612,"value":1851},{"type":606,"tag":636,"props":4030,"children":4031},{"style":690},[4032],{"type":612,"value":1914},{"type":606,"tag":636,"props":4034,"children":4035},{"style":663},[4036],{"type":612,"value":4037},"])  ",{"type":606,"tag":636,"props":4039,"children":4040},{"style":642},[4041],{"type":612,"value":4042},"# Normal: [2, 4, 6]\n",{"type":606,"tag":636,"props":4044,"children":4045},{"class":638,"line":236},[4046,4051,4055,4060,4065,4069],{"type":606,"tag":636,"props":4047,"children":4048},{"style":663},[4049],{"type":612,"value":4050},"result4 ",{"type":606,"tag":636,"props":4052,"children":4053},{"style":651},[4054],{"type":612,"value":722},{"type":606,"tag":636,"props":4056,"children":4057},{"style":663},[4058],{"type":612,"value":4059}," process_data(",{"type":606,"tag":636,"props":4061,"children":4062},{"style":701},[4063],{"type":612,"value":4064},"\"invalid\"",{"type":606,"tag":636,"props":4066,"children":4067},{"style":663},[4068],{"type":612,"value":2790},{"type":606,"tag":636,"props":4070,"children":4071},{"style":642},[4072],{"type":612,"value":4073},"# Error: []\n",{"type":606,"tag":873,"props":4075,"children":4077},{"id":4076},"common-decorator-patterns",[4078],{"type":612,"value":4079},"📊 Common Decorator Patterns",{"type":606,"tag":1970,"props":4081,"children":4082},{},[4083,4103],{"type":606,"tag":1974,"props":4084,"children":4085},{},[4086],{"type":606,"tag":1978,"props":4087,"children":4088},{},[4089,4094,4098],{"type":606,"tag":1982,"props":4090,"children":4091},{},[4092],{"type":612,"value":4093},"Pattern",{"type":606,"tag":1982,"props":4095,"children":4096},{},[4097],{"type":612,"value":1991},{"type":606,"tag":1982,"props":4099,"children":4100},{},[4101],{"type":612,"value":4102},"Implementation",{"type":606,"tag":1998,"props":4104,"children":4105},{},[4106,4124,4142,4160,4178],{"type":606,"tag":1978,"props":4107,"children":4108},{},[4109,4114,4119],{"type":606,"tag":2005,"props":4110,"children":4111},{},[4112],{"type":612,"value":4113},"Timing",{"type":606,"tag":2005,"props":4115,"children":4116},{},[4117],{"type":612,"value":4118},"Measure execution time",{"type":606,"tag":2005,"props":4120,"children":4121},{},[4122],{"type":612,"value":4123},"Store start/end times",{"type":606,"tag":1978,"props":4125,"children":4126},{},[4127,4132,4137],{"type":606,"tag":2005,"props":4128,"children":4129},{},[4130],{"type":612,"value":4131},"Logging",{"type":606,"tag":2005,"props":4133,"children":4134},{},[4135],{"type":612,"value":4136},"Track function calls",{"type":606,"tag":2005,"props":4138,"children":4139},{},[4140],{"type":612,"value":4141},"Print function info",{"type":606,"tag":1978,"props":4143,"children":4144},{},[4145,4150,4155],{"type":606,"tag":2005,"props":4146,"children":4147},{},[4148],{"type":612,"value":4149},"Caching",{"type":606,"tag":2005,"props":4151,"children":4152},{},[4153],{"type":612,"value":4154},"Store results",{"type":606,"tag":2005,"props":4156,"children":4157},{},[4158],{"type":612,"value":4159},"Dictionary to cache returns",{"type":606,"tag":1978,"props":4161,"children":4162},{},[4163,4168,4173],{"type":606,"tag":2005,"props":4164,"children":4165},{},[4166],{"type":612,"value":4167},"Validation",{"type":606,"tag":2005,"props":4169,"children":4170},{},[4171],{"type":612,"value":4172},"Check inputs",{"type":606,"tag":2005,"props":4174,"children":4175},{},[4176],{"type":612,"value":4177},"Type/value checking",{"type":606,"tag":1978,"props":4179,"children":4180},{},[4181,4186,4191],{"type":606,"tag":2005,"props":4182,"children":4183},{},[4184],{"type":612,"value":4185},"Rate limiting",{"type":606,"tag":2005,"props":4187,"children":4188},{},[4189],{"type":612,"value":4190},"Control call frequency",{"type":606,"tag":2005,"props":4192,"children":4193},{},[4194],{"type":612,"value":4195},"Time-based restrictions",{"type":606,"tag":873,"props":4197,"children":4199},{"id":4198},"class-based-decorators",[4200],{"type":612,"value":4201},"🏪 Class-Based Decorators",{"type":606,"tag":621,"props":4203,"children":4204},{},[4205],{"type":606,"tag":625,"props":4206,"children":4208},{"className":627,"code":4207,"language":629,"meta":8,"style":8},"class CallCounter:\n    def __init__(self, func):\n        self.func = func\n        self.count = 0\n    \n    def __call__(self, *args, **kwargs):\n        self.count += 1\n        print(f\"{self.func.__name__} has been called {self.count} times\")\n        return self.func(*args, **kwargs)\n\nclass SimpleCache:\n    def __init__(self, func):\n        self.func = func\n        self.cache = {}\n    \n    def __call__(self, *args):\n        if args in self.cache:\n            print(f\"Cache hit for {args}\")\n            return self.cache[args]\n        \n        result = self.func(*args)\n        self.cache[args] = result\n        print(f\"Cache miss for {args}, storing result\")\n        return result\n\n# Using class-based decorators\n@CallCounter\ndef greet(name):\n    return f\"Hello, {name}!\"\n\n@SimpleCache\ndef expensive_calculation(n):\n    return sum(range(n))\n\n# Test the decorators\nmsg1 = greet(\"Alice\")  # Called 1 time\nmsg2 = greet(\"Bob\")    # Called 2 times\n\ncalc1 = expensive_calculation(1000)  # Cache miss\ncalc2 = expensive_calculation(1000)  # Cache hit\n",[4209],{"type":606,"tag":632,"props":4210,"children":4211},{"__ignoreMap":8},[4212,4229,4246,4268,4289,4297,4330,4351,4411,4444,4451,4467,4482,4501,4522,4529,4553,4579,4620,4636,4644,4672,4692,4733,4744,4751,4759,4767,4783,4815,4822,4830,4847,4871,4878,4886,4915,4945,4952,4982],{"type":606,"tag":636,"props":4213,"children":4214},{"class":638,"line":12},[4215,4220,4225],{"type":606,"tag":636,"props":4216,"children":4217},{"style":651},[4218],{"type":612,"value":4219},"class",{"type":606,"tag":636,"props":4221,"children":4222},{"style":657},[4223],{"type":612,"value":4224}," CallCounter",{"type":606,"tag":636,"props":4226,"children":4227},{"style":663},[4228],{"type":612,"value":3217},{"type":606,"tag":636,"props":4230,"children":4231},{"class":638,"line":27},[4232,4236,4241],{"type":606,"tag":636,"props":4233,"children":4234},{"style":651},[4235],{"type":612,"value":674},{"type":606,"tag":636,"props":4237,"children":4238},{"style":690},[4239],{"type":612,"value":4240}," __init__",{"type":606,"tag":636,"props":4242,"children":4243},{"style":663},[4244],{"type":612,"value":4245},"(self, func):\n",{"type":606,"tag":636,"props":4247,"children":4248},{"class":638,"line":36},[4249,4254,4259,4263],{"type":606,"tag":636,"props":4250,"children":4251},{"style":690},[4252],{"type":612,"value":4253},"        self",{"type":606,"tag":636,"props":4255,"children":4256},{"style":663},[4257],{"type":612,"value":4258},".func ",{"type":606,"tag":636,"props":4260,"children":4261},{"style":651},[4262],{"type":612,"value":722},{"type":606,"tag":636,"props":4264,"children":4265},{"style":663},[4266],{"type":612,"value":4267}," func\n",{"type":606,"tag":636,"props":4269,"children":4270},{"class":638,"line":45},[4271,4275,4280,4284],{"type":606,"tag":636,"props":4272,"children":4273},{"style":690},[4274],{"type":612,"value":4253},{"type":606,"tag":636,"props":4276,"children":4277},{"style":663},[4278],{"type":612,"value":4279},".count ",{"type":606,"tag":636,"props":4281,"children":4282},{"style":651},[4283],{"type":612,"value":722},{"type":606,"tag":636,"props":4285,"children":4286},{"style":690},[4287],{"type":612,"value":4288}," 0\n",{"type":606,"tag":636,"props":4290,"children":4291},{"class":638,"line":54},[4292],{"type":606,"tag":636,"props":4293,"children":4294},{"style":663},[4295],{"type":612,"value":4296},"    \n",{"type":606,"tag":636,"props":4298,"children":4299},{"class":638,"line":63},[4300,4304,4309,4314,4318,4322,4326],{"type":606,"tag":636,"props":4301,"children":4302},{"style":651},[4303],{"type":612,"value":674},{"type":606,"tag":636,"props":4305,"children":4306},{"style":690},[4307],{"type":612,"value":4308}," __call__",{"type":606,"tag":636,"props":4310,"children":4311},{"style":663},[4312],{"type":612,"value":4313},"(self, ",{"type":606,"tag":636,"props":4315,"children":4316},{"style":651},[4317],{"type":612,"value":1106},{"type":606,"tag":636,"props":4319,"children":4320},{"style":663},[4321],{"type":612,"value":1111},{"type":606,"tag":636,"props":4323,"children":4324},{"style":651},[4325],{"type":612,"value":1116},{"type":606,"tag":636,"props":4327,"children":4328},{"style":663},[4329],{"type":612,"value":1121},{"type":606,"tag":636,"props":4331,"children":4332},{"class":638,"line":72},[4333,4337,4341,4346],{"type":606,"tag":636,"props":4334,"children":4335},{"style":690},[4336],{"type":612,"value":4253},{"type":606,"tag":636,"props":4338,"children":4339},{"style":663},[4340],{"type":612,"value":4279},{"type":606,"tag":636,"props":4342,"children":4343},{"style":651},[4344],{"type":612,"value":4345},"+=",{"type":606,"tag":636,"props":4347,"children":4348},{"style":690},[4349],{"type":612,"value":4350}," 1\n",{"type":606,"tag":636,"props":4352,"children":4353},{"class":638,"line":81},[4354,4358,4362,4366,4370,4375,4380,4384,4389,4393,4398,4402,4407],{"type":606,"tag":636,"props":4355,"children":4356},{"style":690},[4357],{"type":612,"value":693},{"type":606,"tag":636,"props":4359,"children":4360},{"style":663},[4361],{"type":612,"value":698},{"type":606,"tag":636,"props":4363,"children":4364},{"style":651},[4365],{"type":612,"value":1203},{"type":606,"tag":636,"props":4367,"children":4368},{"style":701},[4369],{"type":612,"value":1208},{"type":606,"tag":636,"props":4371,"children":4372},{"style":690},[4373],{"type":612,"value":4374},"{self",{"type":606,"tag":636,"props":4376,"children":4377},{"style":663},[4378],{"type":612,"value":4379},".func.",{"type":606,"tag":636,"props":4381,"children":4382},{"style":690},[4383],{"type":612,"value":1223},{"type":606,"tag":636,"props":4385,"children":4386},{"style":701},[4387],{"type":612,"value":4388}," has been called ",{"type":606,"tag":636,"props":4390,"children":4391},{"style":690},[4392],{"type":612,"value":4374},{"type":606,"tag":636,"props":4394,"children":4395},{"style":663},[4396],{"type":612,"value":4397},".count",{"type":606,"tag":636,"props":4399,"children":4400},{"style":690},[4401],{"type":612,"value":1257},{"type":606,"tag":636,"props":4403,"children":4404},{"style":701},[4405],{"type":612,"value":4406}," times\"",{"type":606,"tag":636,"props":4408,"children":4409},{"style":663},[4410],{"type":612,"value":709},{"type":606,"tag":636,"props":4412,"children":4413},{"class":638,"line":776},[4414,4418,4423,4428,4432,4436,4440],{"type":606,"tag":636,"props":4415,"children":4416},{"style":651},[4417],{"type":612,"value":755},{"type":606,"tag":636,"props":4419,"children":4420},{"style":690},[4421],{"type":612,"value":4422}," self",{"type":606,"tag":636,"props":4424,"children":4425},{"style":663},[4426],{"type":612,"value":4427},".func(",{"type":606,"tag":636,"props":4429,"children":4430},{"style":651},[4431],{"type":612,"value":1106},{"type":606,"tag":636,"props":4433,"children":4434},{"style":663},[4435],{"type":612,"value":1111},{"type":606,"tag":636,"props":4437,"children":4438},{"style":651},[4439],{"type":612,"value":1116},{"type":606,"tag":636,"props":4441,"children":4442},{"style":663},[4443],{"type":612,"value":1171},{"type":606,"tag":636,"props":4445,"children":4446},{"class":638,"line":99},[4447],{"type":606,"tag":636,"props":4448,"children":4449},{"emptyLinePlaceholder":13},[4450],{"type":612,"value":782},{"type":606,"tag":636,"props":4452,"children":4453},{"class":638,"line":108},[4454,4458,4463],{"type":606,"tag":636,"props":4455,"children":4456},{"style":651},[4457],{"type":612,"value":4219},{"type":606,"tag":636,"props":4459,"children":4460},{"style":657},[4461],{"type":612,"value":4462}," SimpleCache",{"type":606,"tag":636,"props":4464,"children":4465},{"style":663},[4466],{"type":612,"value":3217},{"type":606,"tag":636,"props":4468,"children":4469},{"class":638,"line":117},[4470,4474,4478],{"type":606,"tag":636,"props":4471,"children":4472},{"style":651},[4473],{"type":612,"value":674},{"type":606,"tag":636,"props":4475,"children":4476},{"style":690},[4477],{"type":612,"value":4240},{"type":606,"tag":636,"props":4479,"children":4480},{"style":663},[4481],{"type":612,"value":4245},{"type":606,"tag":636,"props":4483,"children":4484},{"class":638,"line":126},[4485,4489,4493,4497],{"type":606,"tag":636,"props":4486,"children":4487},{"style":690},[4488],{"type":612,"value":4253},{"type":606,"tag":636,"props":4490,"children":4491},{"style":663},[4492],{"type":612,"value":4258},{"type":606,"tag":636,"props":4494,"children":4495},{"style":651},[4496],{"type":612,"value":722},{"type":606,"tag":636,"props":4498,"children":4499},{"style":663},[4500],{"type":612,"value":4267},{"type":606,"tag":636,"props":4502,"children":4503},{"class":638,"line":135},[4504,4508,4513,4517],{"type":606,"tag":636,"props":4505,"children":4506},{"style":690},[4507],{"type":612,"value":4253},{"type":606,"tag":636,"props":4509,"children":4510},{"style":663},[4511],{"type":612,"value":4512},".cache ",{"type":606,"tag":636,"props":4514,"children":4515},{"style":651},[4516],{"type":612,"value":722},{"type":606,"tag":636,"props":4518,"children":4519},{"style":663},[4520],{"type":612,"value":4521}," {}\n",{"type":606,"tag":636,"props":4523,"children":4524},{"class":638,"line":144},[4525],{"type":606,"tag":636,"props":4526,"children":4527},{"style":663},[4528],{"type":612,"value":4296},{"type":606,"tag":636,"props":4530,"children":4531},{"class":638,"line":153},[4532,4536,4540,4544,4548],{"type":606,"tag":636,"props":4533,"children":4534},{"style":651},[4535],{"type":612,"value":674},{"type":606,"tag":636,"props":4537,"children":4538},{"style":690},[4539],{"type":612,"value":4308},{"type":606,"tag":636,"props":4541,"children":4542},{"style":663},[4543],{"type":612,"value":4313},{"type":606,"tag":636,"props":4545,"children":4546},{"style":651},[4547],{"type":612,"value":1106},{"type":606,"tag":636,"props":4549,"children":4550},{"style":663},[4551],{"type":612,"value":4552},"args):\n",{"type":606,"tag":636,"props":4554,"children":4555},{"class":638,"line":163},[4556,4561,4566,4570,4574],{"type":606,"tag":636,"props":4557,"children":4558},{"style":651},[4559],{"type":612,"value":4560},"        if",{"type":606,"tag":636,"props":4562,"children":4563},{"style":663},[4564],{"type":612,"value":4565}," args ",{"type":606,"tag":636,"props":4567,"children":4568},{"style":651},[4569],{"type":612,"value":2189},{"type":606,"tag":636,"props":4571,"children":4572},{"style":690},[4573],{"type":612,"value":4422},{"type":606,"tag":636,"props":4575,"children":4576},{"style":663},[4577],{"type":612,"value":4578},".cache:\n",{"type":606,"tag":636,"props":4580,"children":4581},{"class":638,"line":172},[4582,4587,4591,4595,4600,4604,4608,4612,4616],{"type":606,"tag":636,"props":4583,"children":4584},{"style":690},[4585],{"type":612,"value":4586},"            print",{"type":606,"tag":636,"props":4588,"children":4589},{"style":663},[4590],{"type":612,"value":698},{"type":606,"tag":636,"props":4592,"children":4593},{"style":651},[4594],{"type":612,"value":1203},{"type":606,"tag":636,"props":4596,"children":4597},{"style":701},[4598],{"type":612,"value":4599},"\"Cache hit for ",{"type":606,"tag":636,"props":4601,"children":4602},{"style":690},[4603],{"type":612,"value":1213},{"type":606,"tag":636,"props":4605,"children":4606},{"style":663},[4607],{"type":612,"value":1594},{"type":606,"tag":636,"props":4609,"children":4610},{"style":690},[4611],{"type":612,"value":1257},{"type":606,"tag":636,"props":4613,"children":4614},{"style":701},[4615],{"type":612,"value":1208},{"type":606,"tag":636,"props":4617,"children":4618},{"style":663},[4619],{"type":612,"value":709},{"type":606,"tag":636,"props":4621,"children":4622},{"class":638,"line":181},[4623,4627,4631],{"type":606,"tag":636,"props":4624,"children":4625},{"style":651},[4626],{"type":612,"value":2238},{"type":606,"tag":636,"props":4628,"children":4629},{"style":690},[4630],{"type":612,"value":4422},{"type":606,"tag":636,"props":4632,"children":4633},{"style":663},[4634],{"type":612,"value":4635},".cache[args]\n",{"type":606,"tag":636,"props":4637,"children":4638},{"class":638,"line":190},[4639],{"type":606,"tag":636,"props":4640,"children":4641},{"style":663},[4642],{"type":612,"value":4643},"        \n",{"type":606,"tag":636,"props":4645,"children":4646},{"class":638,"line":199},[4647,4651,4655,4659,4663,4667],{"type":606,"tag":636,"props":4648,"children":4649},{"style":663},[4650],{"type":612,"value":717},{"type":606,"tag":636,"props":4652,"children":4653},{"style":651},[4654],{"type":612,"value":722},{"type":606,"tag":636,"props":4656,"children":4657},{"style":690},[4658],{"type":612,"value":4422},{"type":606,"tag":636,"props":4660,"children":4661},{"style":663},[4662],{"type":612,"value":4427},{"type":606,"tag":636,"props":4664,"children":4665},{"style":651},[4666],{"type":612,"value":1106},{"type":606,"tag":636,"props":4668,"children":4669},{"style":663},[4670],{"type":612,"value":4671},"args)\n",{"type":606,"tag":636,"props":4673,"children":4674},{"class":638,"line":208},[4675,4679,4684,4688],{"type":606,"tag":636,"props":4676,"children":4677},{"style":690},[4678],{"type":612,"value":4253},{"type":606,"tag":636,"props":4680,"children":4681},{"style":663},[4682],{"type":612,"value":4683},".cache[args] ",{"type":606,"tag":636,"props":4685,"children":4686},{"style":651},[4687],{"type":612,"value":722},{"type":606,"tag":636,"props":4689,"children":4690},{"style":663},[4691],{"type":612,"value":760},{"type":606,"tag":636,"props":4693,"children":4694},{"class":638,"line":217},[4695,4699,4703,4707,4712,4716,4720,4724,4729],{"type":606,"tag":636,"props":4696,"children":4697},{"style":690},[4698],{"type":612,"value":693},{"type":606,"tag":636,"props":4700,"children":4701},{"style":663},[4702],{"type":612,"value":698},{"type":606,"tag":636,"props":4704,"children":4705},{"style":651},[4706],{"type":612,"value":1203},{"type":606,"tag":636,"props":4708,"children":4709},{"style":701},[4710],{"type":612,"value":4711},"\"Cache miss for ",{"type":606,"tag":636,"props":4713,"children":4714},{"style":690},[4715],{"type":612,"value":1213},{"type":606,"tag":636,"props":4717,"children":4718},{"style":663},[4719],{"type":612,"value":1594},{"type":606,"tag":636,"props":4721,"children":4722},{"style":690},[4723],{"type":612,"value":1257},{"type":606,"tag":636,"props":4725,"children":4726},{"style":701},[4727],{"type":612,"value":4728},", storing result\"",{"type":606,"tag":636,"props":4730,"children":4731},{"style":663},[4732],{"type":612,"value":709},{"type":606,"tag":636,"props":4734,"children":4735},{"class":638,"line":227},[4736,4740],{"type":606,"tag":636,"props":4737,"children":4738},{"style":651},[4739],{"type":612,"value":755},{"type":606,"tag":636,"props":4741,"children":4742},{"style":663},[4743],{"type":612,"value":760},{"type":606,"tag":636,"props":4745,"children":4746},{"class":638,"line":236},[4747],{"type":606,"tag":636,"props":4748,"children":4749},{"emptyLinePlaceholder":13},[4750],{"type":612,"value":782},{"type":606,"tag":636,"props":4752,"children":4753},{"class":638,"line":245},[4754],{"type":606,"tag":636,"props":4755,"children":4756},{"style":642},[4757],{"type":612,"value":4758},"# Using class-based decorators\n",{"type":606,"tag":636,"props":4760,"children":4761},{"class":638,"line":254},[4762],{"type":606,"tag":636,"props":4763,"children":4764},{"style":657},[4765],{"type":612,"value":4766},"@CallCounter\n",{"type":606,"tag":636,"props":4768,"children":4769},{"class":638,"line":263},[4770,4774,4778],{"type":606,"tag":636,"props":4771,"children":4772},{"style":651},[4773],{"type":612,"value":654},{"type":606,"tag":636,"props":4775,"children":4776},{"style":657},[4777],{"type":612,"value":1798},{"type":606,"tag":636,"props":4779,"children":4780},{"style":663},[4781],{"type":612,"value":4782},"(name):\n",{"type":606,"tag":636,"props":4784,"children":4785},{"class":638,"line":272},[4786,4790,4794,4799,4803,4807,4811],{"type":606,"tag":636,"props":4787,"children":4788},{"style":651},[4789],{"type":612,"value":768},{"type":606,"tag":636,"props":4791,"children":4792},{"style":651},[4793],{"type":612,"value":1829},{"type":606,"tag":636,"props":4795,"children":4796},{"style":701},[4797],{"type":612,"value":4798},"\"Hello, ",{"type":606,"tag":636,"props":4800,"children":4801},{"style":690},[4802],{"type":612,"value":1213},{"type":606,"tag":636,"props":4804,"children":4805},{"style":663},[4806],{"type":612,"value":1860},{"type":606,"tag":636,"props":4808,"children":4809},{"style":690},[4810],{"type":612,"value":1257},{"type":606,"tag":636,"props":4812,"children":4813},{"style":701},[4814],{"type":612,"value":1869},{"type":606,"tag":636,"props":4816,"children":4817},{"class":638,"line":281},[4818],{"type":606,"tag":636,"props":4819,"children":4820},{"emptyLinePlaceholder":13},[4821],{"type":612,"value":782},{"type":606,"tag":636,"props":4823,"children":4824},{"class":638,"line":291},[4825],{"type":606,"tag":636,"props":4826,"children":4827},{"style":657},[4828],{"type":612,"value":4829},"@SimpleCache\n",{"type":606,"tag":636,"props":4831,"children":4832},{"class":638,"line":302},[4833,4837,4842],{"type":606,"tag":636,"props":4834,"children":4835},{"style":651},[4836],{"type":612,"value":654},{"type":606,"tag":636,"props":4838,"children":4839},{"style":657},[4840],{"type":612,"value":4841}," expensive_calculation",{"type":606,"tag":636,"props":4843,"children":4844},{"style":663},[4845],{"type":612,"value":4846},"(n):\n",{"type":606,"tag":636,"props":4848,"children":4849},{"class":638,"line":311},[4850,4854,4858,4862,4866],{"type":606,"tag":636,"props":4851,"children":4852},{"style":651},[4853],{"type":612,"value":768},{"type":606,"tag":636,"props":4855,"children":4856},{"style":690},[4857],{"type":612,"value":1390},{"type":606,"tag":636,"props":4859,"children":4860},{"style":663},[4861],{"type":612,"value":698},{"type":606,"tag":636,"props":4863,"children":4864},{"style":690},[4865],{"type":612,"value":1399},{"type":606,"tag":636,"props":4867,"children":4868},{"style":663},[4869],{"type":612,"value":4870},"(n))\n",{"type":606,"tag":636,"props":4872,"children":4873},{"class":638,"line":320},[4874],{"type":606,"tag":636,"props":4875,"children":4876},{"emptyLinePlaceholder":13},[4877],{"type":612,"value":782},{"type":606,"tag":636,"props":4879,"children":4880},{"class":638,"line":329},[4881],{"type":606,"tag":636,"props":4882,"children":4883},{"style":642},[4884],{"type":612,"value":4885},"# Test the decorators\n",{"type":606,"tag":636,"props":4887,"children":4888},{"class":638,"line":338},[4889,4894,4898,4902,4906,4910],{"type":606,"tag":636,"props":4890,"children":4891},{"style":663},[4892],{"type":612,"value":4893},"msg1 ",{"type":606,"tag":636,"props":4895,"children":4896},{"style":651},[4897],{"type":612,"value":722},{"type":606,"tag":636,"props":4899,"children":4900},{"style":663},[4901],{"type":612,"value":1935},{"type":606,"tag":636,"props":4903,"children":4904},{"style":701},[4905],{"type":612,"value":1940},{"type":606,"tag":636,"props":4907,"children":4908},{"style":663},[4909],{"type":612,"value":2790},{"type":606,"tag":636,"props":4911,"children":4912},{"style":642},[4913],{"type":612,"value":4914},"# Called 1 time\n",{"type":606,"tag":636,"props":4916,"children":4917},{"class":638,"line":347},[4918,4923,4927,4931,4936,4940],{"type":606,"tag":636,"props":4919,"children":4920},{"style":663},[4921],{"type":612,"value":4922},"msg2 ",{"type":606,"tag":636,"props":4924,"children":4925},{"style":651},[4926],{"type":612,"value":722},{"type":606,"tag":636,"props":4928,"children":4929},{"style":663},[4930],{"type":612,"value":1935},{"type":606,"tag":636,"props":4932,"children":4933},{"style":701},[4934],{"type":612,"value":4935},"\"Bob\"",{"type":606,"tag":636,"props":4937,"children":4938},{"style":663},[4939],{"type":612,"value":3947},{"type":606,"tag":636,"props":4941,"children":4942},{"style":642},[4943],{"type":612,"value":4944},"# Called 2 times\n",{"type":606,"tag":636,"props":4946,"children":4947},{"class":638,"line":356},[4948],{"type":606,"tag":636,"props":4949,"children":4950},{"emptyLinePlaceholder":13},[4951],{"type":612,"value":782},{"type":606,"tag":636,"props":4953,"children":4954},{"class":638,"line":367},[4955,4960,4964,4969,4973,4977],{"type":606,"tag":636,"props":4956,"children":4957},{"style":663},[4958],{"type":612,"value":4959},"calc1 ",{"type":606,"tag":636,"props":4961,"children":4962},{"style":651},[4963],{"type":612,"value":722},{"type":606,"tag":636,"props":4965,"children":4966},{"style":663},[4967],{"type":612,"value":4968}," expensive_calculation(",{"type":606,"tag":636,"props":4970,"children":4971},{"style":690},[4972],{"type":612,"value":1408},{"type":606,"tag":636,"props":4974,"children":4975},{"style":663},[4976],{"type":612,"value":2790},{"type":606,"tag":636,"props":4978,"children":4979},{"style":642},[4980],{"type":612,"value":4981},"# Cache miss\n",{"type":606,"tag":636,"props":4983,"children":4984},{"class":638,"line":376},[4985,4990,4994,4998,5002,5006],{"type":606,"tag":636,"props":4986,"children":4987},{"style":663},[4988],{"type":612,"value":4989},"calc2 ",{"type":606,"tag":636,"props":4991,"children":4992},{"style":651},[4993],{"type":612,"value":722},{"type":606,"tag":636,"props":4995,"children":4996},{"style":663},[4997],{"type":612,"value":4968},{"type":606,"tag":636,"props":4999,"children":5000},{"style":690},[5001],{"type":612,"value":1408},{"type":606,"tag":636,"props":5003,"children":5004},{"style":663},[5005],{"type":612,"value":2790},{"type":606,"tag":636,"props":5007,"children":5008},{"style":642},[5009],{"type":612,"value":5010},"# Cache hit\n",{"type":606,"tag":1027,"props":5012,"children":5014},{"id":5013},"multiple-decorators",[5015],{"type":612,"value":5016},"Multiple Decorators",{"type":606,"tag":621,"props":5018,"children":5019},{},[5020],{"type":606,"tag":625,"props":5021,"children":5023},{"className":627,"code":5022,"language":629,"meta":8,"style":8},"def bold(func):\n    def wrapper(*args, **kwargs):\n        result = func(*args, **kwargs)\n        return f\"**{result}**\"\n    return wrapper\n\ndef italic(func):\n    def wrapper(*args, **kwargs):\n        result = func(*args, **kwargs)\n        return f\"*{result}*\"\n    return wrapper\n\ndef uppercase(func):\n    def wrapper(*args, **kwargs):\n        result = func(*args, **kwargs)\n        return result.upper()\n    return wrapper\n\n# Stack multiple decorators\n@bold\n@italic\n@uppercase\ndef format_text(text):\n    return text\n\n# Test stacked decorators\nformatted = format_text(\"hello world\")\nprint(formatted)  # **_HELLO WORLD_**\n",[5024],{"type":606,"tag":632,"props":5025,"children":5026},{"__ignoreMap":8},[5027,5043,5074,5105,5138,5149,5156,5172,5203,5234,5267,5278,5285,5301,5332,5363,5375,5386,5393,5401,5409,5417,5425,5442,5454,5461,5469,5495],{"type":606,"tag":636,"props":5028,"children":5029},{"class":638,"line":12},[5030,5034,5039],{"type":606,"tag":636,"props":5031,"children":5032},{"style":651},[5033],{"type":612,"value":654},{"type":606,"tag":636,"props":5035,"children":5036},{"style":657},[5037],{"type":612,"value":5038}," bold",{"type":606,"tag":636,"props":5040,"children":5041},{"style":663},[5042],{"type":612,"value":666},{"type":606,"tag":636,"props":5044,"children":5045},{"class":638,"line":27},[5046,5050,5054,5058,5062,5066,5070],{"type":606,"tag":636,"props":5047,"children":5048},{"style":651},[5049],{"type":612,"value":674},{"type":606,"tag":636,"props":5051,"children":5052},{"style":657},[5053],{"type":612,"value":679},{"type":606,"tag":636,"props":5055,"children":5056},{"style":663},[5057],{"type":612,"value":698},{"type":606,"tag":636,"props":5059,"children":5060},{"style":651},[5061],{"type":612,"value":1106},{"type":606,"tag":636,"props":5063,"children":5064},{"style":663},[5065],{"type":612,"value":1111},{"type":606,"tag":636,"props":5067,"children":5068},{"style":651},[5069],{"type":612,"value":1116},{"type":606,"tag":636,"props":5071,"children":5072},{"style":663},[5073],{"type":612,"value":1121},{"type":606,"tag":636,"props":5075,"children":5076},{"class":638,"line":36},[5077,5081,5085,5089,5093,5097,5101],{"type":606,"tag":636,"props":5078,"children":5079},{"style":663},[5080],{"type":612,"value":717},{"type":606,"tag":636,"props":5082,"children":5083},{"style":651},[5084],{"type":612,"value":722},{"type":606,"tag":636,"props":5086,"children":5087},{"style":663},[5088],{"type":612,"value":1154},{"type":606,"tag":636,"props":5090,"children":5091},{"style":651},[5092],{"type":612,"value":1106},{"type":606,"tag":636,"props":5094,"children":5095},{"style":663},[5096],{"type":612,"value":1111},{"type":606,"tag":636,"props":5098,"children":5099},{"style":651},[5100],{"type":612,"value":1116},{"type":606,"tag":636,"props":5102,"children":5103},{"style":663},[5104],{"type":612,"value":1171},{"type":606,"tag":636,"props":5106,"children":5107},{"class":638,"line":45},[5108,5112,5116,5121,5125,5129,5133],{"type":606,"tag":636,"props":5109,"children":5110},{"style":651},[5111],{"type":612,"value":755},{"type":606,"tag":636,"props":5113,"children":5114},{"style":651},[5115],{"type":612,"value":1829},{"type":606,"tag":636,"props":5117,"children":5118},{"style":701},[5119],{"type":612,"value":5120},"\"**",{"type":606,"tag":636,"props":5122,"children":5123},{"style":690},[5124],{"type":612,"value":1213},{"type":606,"tag":636,"props":5126,"children":5127},{"style":663},[5128],{"type":612,"value":1684},{"type":606,"tag":636,"props":5130,"children":5131},{"style":690},[5132],{"type":612,"value":1257},{"type":606,"tag":636,"props":5134,"children":5135},{"style":701},[5136],{"type":612,"value":5137},"**\"\n",{"type":606,"tag":636,"props":5139,"children":5140},{"class":638,"line":54},[5141,5145],{"type":606,"tag":636,"props":5142,"children":5143},{"style":651},[5144],{"type":612,"value":768},{"type":606,"tag":636,"props":5146,"children":5147},{"style":663},[5148],{"type":612,"value":773},{"type":606,"tag":636,"props":5150,"children":5151},{"class":638,"line":63},[5152],{"type":606,"tag":636,"props":5153,"children":5154},{"emptyLinePlaceholder":13},[5155],{"type":612,"value":782},{"type":606,"tag":636,"props":5157,"children":5158},{"class":638,"line":72},[5159,5163,5168],{"type":606,"tag":636,"props":5160,"children":5161},{"style":651},[5162],{"type":612,"value":654},{"type":606,"tag":636,"props":5164,"children":5165},{"style":657},[5166],{"type":612,"value":5167}," italic",{"type":606,"tag":636,"props":5169,"children":5170},{"style":663},[5171],{"type":612,"value":666},{"type":606,"tag":636,"props":5173,"children":5174},{"class":638,"line":81},[5175,5179,5183,5187,5191,5195,5199],{"type":606,"tag":636,"props":5176,"children":5177},{"style":651},[5178],{"type":612,"value":674},{"type":606,"tag":636,"props":5180,"children":5181},{"style":657},[5182],{"type":612,"value":679},{"type":606,"tag":636,"props":5184,"children":5185},{"style":663},[5186],{"type":612,"value":698},{"type":606,"tag":636,"props":5188,"children":5189},{"style":651},[5190],{"type":612,"value":1106},{"type":606,"tag":636,"props":5192,"children":5193},{"style":663},[5194],{"type":612,"value":1111},{"type":606,"tag":636,"props":5196,"children":5197},{"style":651},[5198],{"type":612,"value":1116},{"type":606,"tag":636,"props":5200,"children":5201},{"style":663},[5202],{"type":612,"value":1121},{"type":606,"tag":636,"props":5204,"children":5205},{"class":638,"line":776},[5206,5210,5214,5218,5222,5226,5230],{"type":606,"tag":636,"props":5207,"children":5208},{"style":663},[5209],{"type":612,"value":717},{"type":606,"tag":636,"props":5211,"children":5212},{"style":651},[5213],{"type":612,"value":722},{"type":606,"tag":636,"props":5215,"children":5216},{"style":663},[5217],{"type":612,"value":1154},{"type":606,"tag":636,"props":5219,"children":5220},{"style":651},[5221],{"type":612,"value":1106},{"type":606,"tag":636,"props":5223,"children":5224},{"style":663},[5225],{"type":612,"value":1111},{"type":606,"tag":636,"props":5227,"children":5228},{"style":651},[5229],{"type":612,"value":1116},{"type":606,"tag":636,"props":5231,"children":5232},{"style":663},[5233],{"type":612,"value":1171},{"type":606,"tag":636,"props":5235,"children":5236},{"class":638,"line":99},[5237,5241,5245,5250,5254,5258,5262],{"type":606,"tag":636,"props":5238,"children":5239},{"style":651},[5240],{"type":612,"value":755},{"type":606,"tag":636,"props":5242,"children":5243},{"style":651},[5244],{"type":612,"value":1829},{"type":606,"tag":636,"props":5246,"children":5247},{"style":701},[5248],{"type":612,"value":5249},"\"*",{"type":606,"tag":636,"props":5251,"children":5252},{"style":690},[5253],{"type":612,"value":1213},{"type":606,"tag":636,"props":5255,"children":5256},{"style":663},[5257],{"type":612,"value":1684},{"type":606,"tag":636,"props":5259,"children":5260},{"style":690},[5261],{"type":612,"value":1257},{"type":606,"tag":636,"props":5263,"children":5264},{"style":701},[5265],{"type":612,"value":5266},"*\"\n",{"type":606,"tag":636,"props":5268,"children":5269},{"class":638,"line":108},[5270,5274],{"type":606,"tag":636,"props":5271,"children":5272},{"style":651},[5273],{"type":612,"value":768},{"type":606,"tag":636,"props":5275,"children":5276},{"style":663},[5277],{"type":612,"value":773},{"type":606,"tag":636,"props":5279,"children":5280},{"class":638,"line":117},[5281],{"type":606,"tag":636,"props":5282,"children":5283},{"emptyLinePlaceholder":13},[5284],{"type":612,"value":782},{"type":606,"tag":636,"props":5286,"children":5287},{"class":638,"line":126},[5288,5292,5297],{"type":606,"tag":636,"props":5289,"children":5290},{"style":651},[5291],{"type":612,"value":654},{"type":606,"tag":636,"props":5293,"children":5294},{"style":657},[5295],{"type":612,"value":5296}," uppercase",{"type":606,"tag":636,"props":5298,"children":5299},{"style":663},[5300],{"type":612,"value":666},{"type":606,"tag":636,"props":5302,"children":5303},{"class":638,"line":135},[5304,5308,5312,5316,5320,5324,5328],{"type":606,"tag":636,"props":5305,"children":5306},{"style":651},[5307],{"type":612,"value":674},{"type":606,"tag":636,"props":5309,"children":5310},{"style":657},[5311],{"type":612,"value":679},{"type":606,"tag":636,"props":5313,"children":5314},{"style":663},[5315],{"type":612,"value":698},{"type":606,"tag":636,"props":5317,"children":5318},{"style":651},[5319],{"type":612,"value":1106},{"type":606,"tag":636,"props":5321,"children":5322},{"style":663},[5323],{"type":612,"value":1111},{"type":606,"tag":636,"props":5325,"children":5326},{"style":651},[5327],{"type":612,"value":1116},{"type":606,"tag":636,"props":5329,"children":5330},{"style":663},[5331],{"type":612,"value":1121},{"type":606,"tag":636,"props":5333,"children":5334},{"class":638,"line":144},[5335,5339,5343,5347,5351,5355,5359],{"type":606,"tag":636,"props":5336,"children":5337},{"style":663},[5338],{"type":612,"value":717},{"type":606,"tag":636,"props":5340,"children":5341},{"style":651},[5342],{"type":612,"value":722},{"type":606,"tag":636,"props":5344,"children":5345},{"style":663},[5346],{"type":612,"value":1154},{"type":606,"tag":636,"props":5348,"children":5349},{"style":651},[5350],{"type":612,"value":1106},{"type":606,"tag":636,"props":5352,"children":5353},{"style":663},[5354],{"type":612,"value":1111},{"type":606,"tag":636,"props":5356,"children":5357},{"style":651},[5358],{"type":612,"value":1116},{"type":606,"tag":636,"props":5360,"children":5361},{"style":663},[5362],{"type":612,"value":1171},{"type":606,"tag":636,"props":5364,"children":5365},{"class":638,"line":153},[5366,5370],{"type":606,"tag":636,"props":5367,"children":5368},{"style":651},[5369],{"type":612,"value":755},{"type":606,"tag":636,"props":5371,"children":5372},{"style":663},[5373],{"type":612,"value":5374}," result.upper()\n",{"type":606,"tag":636,"props":5376,"children":5377},{"class":638,"line":163},[5378,5382],{"type":606,"tag":636,"props":5379,"children":5380},{"style":651},[5381],{"type":612,"value":768},{"type":606,"tag":636,"props":5383,"children":5384},{"style":663},[5385],{"type":612,"value":773},{"type":606,"tag":636,"props":5387,"children":5388},{"class":638,"line":172},[5389],{"type":606,"tag":636,"props":5390,"children":5391},{"emptyLinePlaceholder":13},[5392],{"type":612,"value":782},{"type":606,"tag":636,"props":5394,"children":5395},{"class":638,"line":181},[5396],{"type":606,"tag":636,"props":5397,"children":5398},{"style":642},[5399],{"type":612,"value":5400},"# Stack multiple decorators\n",{"type":606,"tag":636,"props":5402,"children":5403},{"class":638,"line":190},[5404],{"type":606,"tag":636,"props":5405,"children":5406},{"style":657},[5407],{"type":612,"value":5408},"@bold\n",{"type":606,"tag":636,"props":5410,"children":5411},{"class":638,"line":199},[5412],{"type":606,"tag":636,"props":5413,"children":5414},{"style":657},[5415],{"type":612,"value":5416},"@italic\n",{"type":606,"tag":636,"props":5418,"children":5419},{"class":638,"line":208},[5420],{"type":606,"tag":636,"props":5421,"children":5422},{"style":657},[5423],{"type":612,"value":5424},"@uppercase\n",{"type":606,"tag":636,"props":5426,"children":5427},{"class":638,"line":217},[5428,5432,5437],{"type":606,"tag":636,"props":5429,"children":5430},{"style":651},[5431],{"type":612,"value":654},{"type":606,"tag":636,"props":5433,"children":5434},{"style":657},[5435],{"type":612,"value":5436}," format_text",{"type":606,"tag":636,"props":5438,"children":5439},{"style":663},[5440],{"type":612,"value":5441},"(text):\n",{"type":606,"tag":636,"props":5443,"children":5444},{"class":638,"line":227},[5445,5449],{"type":606,"tag":636,"props":5446,"children":5447},{"style":651},[5448],{"type":612,"value":768},{"type":606,"tag":636,"props":5450,"children":5451},{"style":663},[5452],{"type":612,"value":5453}," text\n",{"type":606,"tag":636,"props":5455,"children":5456},{"class":638,"line":236},[5457],{"type":606,"tag":636,"props":5458,"children":5459},{"emptyLinePlaceholder":13},[5460],{"type":612,"value":782},{"type":606,"tag":636,"props":5462,"children":5463},{"class":638,"line":245},[5464],{"type":606,"tag":636,"props":5465,"children":5466},{"style":642},[5467],{"type":612,"value":5468},"# Test stacked decorators\n",{"type":606,"tag":636,"props":5470,"children":5471},{"class":638,"line":254},[5472,5477,5481,5486,5491],{"type":606,"tag":636,"props":5473,"children":5474},{"style":663},[5475],{"type":612,"value":5476},"formatted ",{"type":606,"tag":636,"props":5478,"children":5479},{"style":651},[5480],{"type":612,"value":722},{"type":606,"tag":636,"props":5482,"children":5483},{"style":663},[5484],{"type":612,"value":5485}," format_text(",{"type":606,"tag":636,"props":5487,"children":5488},{"style":701},[5489],{"type":612,"value":5490},"\"hello world\"",{"type":606,"tag":636,"props":5492,"children":5493},{"style":663},[5494],{"type":612,"value":709},{"type":606,"tag":636,"props":5496,"children":5497},{"class":638,"line":263},[5498,5503,5508],{"type":606,"tag":636,"props":5499,"children":5500},{"style":690},[5501],{"type":612,"value":5502},"print",{"type":606,"tag":636,"props":5504,"children":5505},{"style":663},[5506],{"type":612,"value":5507},"(formatted)  ",{"type":606,"tag":636,"props":5509,"children":5510},{"style":642},[5511],{"type":612,"value":5512},"# **_HELLO WORLD_**\n",{"type":606,"tag":873,"props":5514,"children":5516},{"id":5515},"preserving-function-information",[5517],{"type":612,"value":5518},"🔄 Preserving Function Information",{"type":606,"tag":621,"props":5520,"children":5521},{},[5522],{"type":606,"tag":625,"props":5523,"children":5525},{"className":627,"code":5524,"language":629,"meta":8,"style":8},"import functools\n\ndef better_decorator(func):\n    @functools.wraps(func)\n    def wrapper(*args, **kwargs):\n        print(f\"Calling {func.__name__}\")\n        return func(*args, **kwargs)\n    return wrapper\n\n@better_decorator\ndef example_function():\n    \"\"\"This is an example function.\"\"\"\n    return \"Hello!\"\n\n# Function information is preserved\nprint(f\"Name: {example_function.__name__}\")\nprint(f\"Doc: {example_function.__doc__}\")\n",[5526],{"type":606,"tag":632,"props":5527,"children":5528},{"__ignoreMap":8},[5529,5541,5548,5564,5577,5608,5648,5675,5686,5693,5701,5717,5725,5737,5744,5752,5793],{"type":606,"tag":636,"props":5530,"children":5531},{"class":638,"line":12},[5532,5536],{"type":606,"tag":636,"props":5533,"children":5534},{"style":651},[5535],{"type":612,"value":1058},{"type":606,"tag":636,"props":5537,"children":5538},{"style":663},[5539],{"type":612,"value":5540}," functools\n",{"type":606,"tag":636,"props":5542,"children":5543},{"class":638,"line":27},[5544],{"type":606,"tag":636,"props":5545,"children":5546},{"emptyLinePlaceholder":13},[5547],{"type":612,"value":782},{"type":606,"tag":636,"props":5549,"children":5550},{"class":638,"line":36},[5551,5555,5560],{"type":606,"tag":636,"props":5552,"children":5553},{"style":651},[5554],{"type":612,"value":654},{"type":606,"tag":636,"props":5556,"children":5557},{"style":657},[5558],{"type":612,"value":5559}," better_decorator",{"type":606,"tag":636,"props":5561,"children":5562},{"style":663},[5563],{"type":612,"value":666},{"type":606,"tag":636,"props":5565,"children":5566},{"class":638,"line":45},[5567,5572],{"type":606,"tag":636,"props":5568,"children":5569},{"style":657},[5570],{"type":612,"value":5571},"    @functools.wraps",{"type":606,"tag":636,"props":5573,"children":5574},{"style":663},[5575],{"type":612,"value":5576},"(func)\n",{"type":606,"tag":636,"props":5578,"children":5579},{"class":638,"line":54},[5580,5584,5588,5592,5596,5600,5604],{"type":606,"tag":636,"props":5581,"children":5582},{"style":651},[5583],{"type":612,"value":674},{"type":606,"tag":636,"props":5585,"children":5586},{"style":657},[5587],{"type":612,"value":679},{"type":606,"tag":636,"props":5589,"children":5590},{"style":663},[5591],{"type":612,"value":698},{"type":606,"tag":636,"props":5593,"children":5594},{"style":651},[5595],{"type":612,"value":1106},{"type":606,"tag":636,"props":5597,"children":5598},{"style":663},[5599],{"type":612,"value":1111},{"type":606,"tag":636,"props":5601,"children":5602},{"style":651},[5603],{"type":612,"value":1116},{"type":606,"tag":636,"props":5605,"children":5606},{"style":663},[5607],{"type":612,"value":1121},{"type":606,"tag":636,"props":5609,"children":5610},{"class":638,"line":63},[5611,5615,5619,5623,5628,5632,5636,5640,5644],{"type":606,"tag":636,"props":5612,"children":5613},{"style":690},[5614],{"type":612,"value":693},{"type":606,"tag":636,"props":5616,"children":5617},{"style":663},[5618],{"type":612,"value":698},{"type":606,"tag":636,"props":5620,"children":5621},{"style":651},[5622],{"type":612,"value":1203},{"type":606,"tag":636,"props":5624,"children":5625},{"style":701},[5626],{"type":612,"value":5627},"\"Calling ",{"type":606,"tag":636,"props":5629,"children":5630},{"style":690},[5631],{"type":612,"value":1213},{"type":606,"tag":636,"props":5633,"children":5634},{"style":663},[5635],{"type":612,"value":1218},{"type":606,"tag":636,"props":5637,"children":5638},{"style":690},[5639],{"type":612,"value":1223},{"type":606,"tag":636,"props":5641,"children":5642},{"style":701},[5643],{"type":612,"value":1208},{"type":606,"tag":636,"props":5645,"children":5646},{"style":663},[5647],{"type":612,"value":709},{"type":606,"tag":636,"props":5649,"children":5650},{"class":638,"line":72},[5651,5655,5659,5663,5667,5671],{"type":606,"tag":636,"props":5652,"children":5653},{"style":651},[5654],{"type":612,"value":755},{"type":606,"tag":636,"props":5656,"children":5657},{"style":663},[5658],{"type":612,"value":1154},{"type":606,"tag":636,"props":5660,"children":5661},{"style":651},[5662],{"type":612,"value":1106},{"type":606,"tag":636,"props":5664,"children":5665},{"style":663},[5666],{"type":612,"value":1111},{"type":606,"tag":636,"props":5668,"children":5669},{"style":651},[5670],{"type":612,"value":1116},{"type":606,"tag":636,"props":5672,"children":5673},{"style":663},[5674],{"type":612,"value":1171},{"type":606,"tag":636,"props":5676,"children":5677},{"class":638,"line":81},[5678,5682],{"type":606,"tag":636,"props":5679,"children":5680},{"style":651},[5681],{"type":612,"value":768},{"type":606,"tag":636,"props":5683,"children":5684},{"style":663},[5685],{"type":612,"value":773},{"type":606,"tag":636,"props":5687,"children":5688},{"class":638,"line":776},[5689],{"type":606,"tag":636,"props":5690,"children":5691},{"emptyLinePlaceholder":13},[5692],{"type":612,"value":782},{"type":606,"tag":636,"props":5694,"children":5695},{"class":638,"line":99},[5696],{"type":606,"tag":636,"props":5697,"children":5698},{"style":657},[5699],{"type":612,"value":5700},"@better_decorator\n",{"type":606,"tag":636,"props":5702,"children":5703},{"class":638,"line":108},[5704,5708,5713],{"type":606,"tag":636,"props":5705,"children":5706},{"style":651},[5707],{"type":612,"value":654},{"type":606,"tag":636,"props":5709,"children":5710},{"style":657},[5711],{"type":612,"value":5712}," example_function",{"type":606,"tag":636,"props":5714,"children":5715},{"style":663},[5716],{"type":612,"value":684},{"type":606,"tag":636,"props":5718,"children":5719},{"class":638,"line":117},[5720],{"type":606,"tag":636,"props":5721,"children":5722},{"style":701},[5723],{"type":612,"value":5724},"    \"\"\"This is an example function.\"\"\"\n",{"type":606,"tag":636,"props":5726,"children":5727},{"class":638,"line":126},[5728,5732],{"type":606,"tag":636,"props":5729,"children":5730},{"style":651},[5731],{"type":612,"value":768},{"type":606,"tag":636,"props":5733,"children":5734},{"style":701},[5735],{"type":612,"value":5736}," \"Hello!\"\n",{"type":606,"tag":636,"props":5738,"children":5739},{"class":638,"line":135},[5740],{"type":606,"tag":636,"props":5741,"children":5742},{"emptyLinePlaceholder":13},[5743],{"type":612,"value":782},{"type":606,"tag":636,"props":5745,"children":5746},{"class":638,"line":144},[5747],{"type":606,"tag":636,"props":5748,"children":5749},{"style":642},[5750],{"type":612,"value":5751},"# Function information is preserved\n",{"type":606,"tag":636,"props":5753,"children":5754},{"class":638,"line":153},[5755,5759,5763,5767,5772,5776,5781,5785,5789],{"type":606,"tag":636,"props":5756,"children":5757},{"style":690},[5758],{"type":612,"value":5502},{"type":606,"tag":636,"props":5760,"children":5761},{"style":663},[5762],{"type":612,"value":698},{"type":606,"tag":636,"props":5764,"children":5765},{"style":651},[5766],{"type":612,"value":1203},{"type":606,"tag":636,"props":5768,"children":5769},{"style":701},[5770],{"type":612,"value":5771},"\"Name: ",{"type":606,"tag":636,"props":5773,"children":5774},{"style":690},[5775],{"type":612,"value":1213},{"type":606,"tag":636,"props":5777,"children":5778},{"style":663},[5779],{"type":612,"value":5780},"example_function.",{"type":606,"tag":636,"props":5782,"children":5783},{"style":690},[5784],{"type":612,"value":1223},{"type":606,"tag":636,"props":5786,"children":5787},{"style":701},[5788],{"type":612,"value":1208},{"type":606,"tag":636,"props":5790,"children":5791},{"style":663},[5792],{"type":612,"value":709},{"type":606,"tag":636,"props":5794,"children":5795},{"class":638,"line":163},[5796,5800,5804,5808,5813,5817,5821,5826,5830],{"type":606,"tag":636,"props":5797,"children":5798},{"style":690},[5799],{"type":612,"value":5502},{"type":606,"tag":636,"props":5801,"children":5802},{"style":663},[5803],{"type":612,"value":698},{"type":606,"tag":636,"props":5805,"children":5806},{"style":651},[5807],{"type":612,"value":1203},{"type":606,"tag":636,"props":5809,"children":5810},{"style":701},[5811],{"type":612,"value":5812},"\"Doc: ",{"type":606,"tag":636,"props":5814,"children":5815},{"style":690},[5816],{"type":612,"value":1213},{"type":606,"tag":636,"props":5818,"children":5819},{"style":663},[5820],{"type":612,"value":5780},{"type":606,"tag":636,"props":5822,"children":5823},{"style":690},[5824],{"type":612,"value":5825},"__doc__}",{"type":606,"tag":636,"props":5827,"children":5828},{"style":701},[5829],{"type":612,"value":1208},{"type":606,"tag":636,"props":5831,"children":5832},{"style":663},[5833],{"type":612,"value":709},{"type":606,"tag":873,"props":5835,"children":5837},{"id":5836},"key-takeaways",[5838],{"type":612,"value":5839},"🎯 Key Takeaways",{"type":606,"tag":885,"props":5841,"children":5845},{"emoji":5842,"title":5843,"type":5844},"📚","Decorator Essentials","success",[5846,5854,5881,5889,5912,5920,5950],{"type":606,"tag":615,"props":5847,"children":5848},{},[5849],{"type":606,"tag":895,"props":5850,"children":5851},{},[5852],{"type":612,"value":5853},"Basic Structure:",{"type":606,"tag":5855,"props":5856,"children":5857},"ul",{},[5858,5863,5876],{"type":606,"tag":905,"props":5859,"children":5860},{},[5861],{"type":612,"value":5862},"Function that takes a function and returns a function",{"type":606,"tag":905,"props":5864,"children":5865},{},[5866,5868,5874],{"type":612,"value":5867},"Use ",{"type":606,"tag":632,"props":5869,"children":5871},{"className":5870},[],[5872],{"type":612,"value":5873},"@decorator_name",{"type":612,"value":5875}," syntax for clean application",{"type":606,"tag":905,"props":5877,"children":5878},{},[5879],{"type":612,"value":5880},"Wrapper function handles the actual logic",{"type":606,"tag":615,"props":5882,"children":5883},{},[5884],{"type":606,"tag":895,"props":5885,"children":5886},{},[5887],{"type":612,"value":5888},"Common Uses:",{"type":606,"tag":5855,"props":5890,"children":5891},{},[5892,5897,5902,5907],{"type":606,"tag":905,"props":5893,"children":5894},{},[5895],{"type":612,"value":5896},"Timing and performance monitoring",{"type":606,"tag":905,"props":5898,"children":5899},{},[5900],{"type":612,"value":5901},"Logging and debugging",{"type":606,"tag":905,"props":5903,"children":5904},{},[5905],{"type":612,"value":5906},"Input validation and error handling",{"type":606,"tag":905,"props":5908,"children":5909},{},[5910],{"type":612,"value":5911},"Caching and memoization",{"type":606,"tag":615,"props":5913,"children":5914},{},[5915],{"type":606,"tag":895,"props":5916,"children":5917},{},[5918],{"type":612,"value":5919},"Best Practices:",{"type":606,"tag":5855,"props":5921,"children":5922},{},[5923,5935,5940,5945],{"type":606,"tag":905,"props":5924,"children":5925},{},[5926,5927,5933],{"type":612,"value":5867},{"type":606,"tag":632,"props":5928,"children":5930},{"className":5929},[],[5931],{"type":612,"value":5932},"functools.wraps",{"type":612,"value":5934}," to preserve function metadata",{"type":606,"tag":905,"props":5936,"children":5937},{},[5938],{"type":612,"value":5939},"Handle *args and **kwargs for flexibility",{"type":606,"tag":905,"props":5941,"children":5942},{},[5943],{"type":612,"value":5944},"Keep decorators simple and focused",{"type":606,"tag":905,"props":5946,"children":5947},{},[5948],{"type":612,"value":5949},"Document what your decorator does",{"type":606,"tag":615,"props":5951,"children":5952},{},[5953,5958],{"type":606,"tag":895,"props":5954,"children":5955},{},[5956],{"type":612,"value":5957},"Remember:",{"type":612,"value":5959}," Decorators make code more modular and reusable!",{"type":606,"tag":873,"props":5961,"children":5963},{"id":5962},"whats-next",[5964],{"type":612,"value":5965},"🚀 What's Next?",{"type":606,"tag":615,"props":5967,"children":5968},{},[5969],{"type":612,"value":5970},"Learn about generators to create memory-efficient iterators with yield.",{"type":606,"tag":615,"props":5972,"children":5973},{},[5974,5979,5980],{"type":606,"tag":895,"props":5975,"children":5976},{},[5977],{"type":612,"value":5978},"Continue to",{"type":612,"value":3683},{"type":606,"tag":5981,"props":5982,"children":5983},"a",{"href":446},[5984],{"type":612,"value":447},{"type":606,"tag":5986,"props":5987,"children":5988},"style",{},[5989],{"type":612,"value":5990},"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":5992},[5993,5997,5998,6003,6004,6007,6008,6009],{"id":875,"depth":27,"text":878,"children":5994},[5995,5996],{"id":1029,"depth":36,"text":1032},{"id":1465,"depth":36,"text":1468},{"id":1965,"depth":27,"text":1968},{"id":2087,"depth":27,"text":2090,"children":5999},[6000,6001,6002],{"id":2093,"depth":36,"text":2096},{"id":2806,"depth":36,"text":2809},{"id":3494,"depth":36,"text":3497},{"id":4076,"depth":27,"text":4079},{"id":4198,"depth":27,"text":4201,"children":6005},[6006],{"id":5013,"depth":36,"text":5016},{"id":5515,"depth":27,"text":5518},{"id":5836,"depth":27,"text":5839},{"id":5962,"depth":27,"text":5965},1782373761883]