Skip to content

This repository contains the first assignments for Software Design with Python [SDwP] course at Innopolis University.

Notifications You must be signed in to change notification settings

SibaIssa/Decorators-in-Action

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 

Repository files navigation

Decorators in action

This repository is part of an assignment for Software Design with Python [SDwP] course, in which we will try to exhaust all the characteristics of python.


This main idea of this repository is to solve Four main tasks as it shown in the below structure:

sss

  • The First task is to Create a function decorator that calculates function execution time and the number of times the decorated function was called (function call trace).

  • In the Second task is an extended implementation of the first task so the decorator could dump original source code of the function.

  • The third task is to implement the decorator behavior in tasks 1 & 2 using a class decorator.

  • and the last task is to extend our program so that if a decorated function encounters an error it wouldn’t put it back into stdout. Instead, pipe the error stream into a log file together with a timestamp.


I implemented the methods that is covered on SDwP course by using Python 3.8.

If you open the 'src' folder you will find five '.py' files. Four files to solve main tasks and a 'main.py' file to test our tasks (I used Four functions for testing process). You can try it by yourself; just open the 'main.py' file and uncomment whatever you want.

About

This repository contains the first assignments for Software Design with Python [SDwP] course at Innopolis University.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published