Giter VIP home page Giter VIP logo

alx-backend-python's Introduction

Python Variable Annotations Project

Learning Objectives

By the end of this project, you will gain knowledge and skills in the following areas:

  • Understanding type annotations in Python 3.
  • Using type annotations to specify function signatures and variable types.
  • Exploring the concept of duck typing in Python.
  • Validating your code for type correctness using Mypy.

Requirements

General

  • Editors: You are allowed to use vi, vim, or emacs for coding.
  • Python Version: All code will be interpreted/compiled using Python 3 (version 3.7).
  • File Endings: Ensure that all your files end with a newline character.
  • Shebang Line: The first line of all your Python files should be exactly #!/usr/bin/env python3.
  • README.md: A mandatory README.md file must be present at the root of your project folder.
  • Code Style: Your code should adhere to the pycodestyle style (version 2.5).
  • Executable Files: All your Python files must be executable.
  • File Length: The length of your files will be tested using wc.
  • Documentation:
    • All your modules should have documentation. You can check this using python3 -c 'print(__import__("my_module").__doc__)'.
    • All your classes should have documentation. You can check this using python3 -c 'print(__import__("my_module").MyClass.__doc__)'.
    • All your functions, both inside and outside a class, should have documentation. You can check this using python3 -c 'print(__import__("my_module").my_function.__doc__)' and python3 -c 'print(__import__("my_module").MyClass.my_function.__doc__)'.

Documentation Guidelines

  • A documentation is not just a single word; it should be a complete sentence that explains the purpose of the module, class, or method. The length of your documentation will be verified.

Project Overview

This project is designed to help you improve your Python programming skills with a focus on variable annotations and type hinting. You will learn how to specify data types for variables, function parameters, and return values using type annotations. Additionally, you will explore the concept of duck typing and how to use the Mypy tool to validate your code for type correctness.

Getting Started

To get started with this project, follow these steps:

  1. Clone the repository to your local machine.

  2. Ensure you have the required Python version (3.7) installed.

  3. Use your preferred editor (vi, vim, emacs) to work on the project files.

  4. Follow the project requirements and guidelines outlined above to complete the tasks.

  5. Use Mypy to validate your code for type correctness.

Additional Resources

Happy coding!

alx-backend-python's People

Contributors

ambesawi avatar

Stargazers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.