Skip to main content

Making totally readable code

Project description

Overiew

NO DEPENDENCIES REQUIRED

Joke Python module for making your code 'more readable'.

Has a weird naming scheme, random abstracted functions for no reason, and anything else that you could ever want!

Functions

  • Return_Value_Of(Value) - Returns Value OFC (useless).

  • Error(Err = Exception) - Raises an exception (kinda useless).

  • Empty() - Does nothing (useless).

  • Range(Number) / Len(List) / Int(Number) / String(Message) / Bool(Boolean) / Float(Decimal) / List(Array) / Print(Message) - The corresponding function but capitalised.

  • Add(Number_One, Number_Two) / Subtract(Number_One, Number_Two) / Multiply(Number_One, Number_Two) / Divide(Number_One, Number_Two) / Int_Divide(Number_One, Number_Two) / Modulo(Number_One, Number_Two) - Math operations.

  • Is_Odd(Number) / Is_Even(Number) / Is_Positive(Number) / Is_Negative(Number) / Is_Zero(Number) / Is_Wholly_Divisible(Number_One, Number_Two) / Is_Whole(Number) / Is_Float(Number) - Math checks.

  • Character_To_Code(Character) / Code_To_Character(Code) - Character-Code operations.

  • Uppercase(Message) / Lowercase(Message) - String operations.

  • Is_Uppercase(Message) / Is_Lowercase(Message) / Is_Alphabet_Exclusive(Message) / Is_Number_Exclusive(Message) / Is_Alphabet_Number(Message) - String checks.

  • And(Bool_One, Bool_Two) / Or(Bool_One, Bool_Two) / Not(Bool) / Equal(Bool_One, Bool_Two) / Not_Equal(Bool_One, Bool_Two) - Bool operations.

  • Print_Multiple_Times(Count, Msg) - Prints Msg Count amount of times.

  • Sum_Multiple_Numbers(Numbers) - Sums multiple numbers.

  • Multiply_Multiple_Numbers(Numbers) - Multiplies multiple numbers.

  • Get_Input_From_User(Message, Type = String) - Gets an input from the user and applies a function to that input (intended to change the input type which is by default string).

  • If_Selection(Condition, True_Code, True_Argument_List = [], False_Code = lambda: none, False_Argument_List = []) - Creates an if statement that will run the true code with the given list of arguments if the condition is true, else will run the false code with the given list of arguments.

  • For_Loop(List, Code, PassElement, Arguments) - Creates a for loop iterating over a list, where the body code is a function, and the extra arguments (first of which will be the element if PassElement is true) goes into it.

  • While_Loop(Condition, Code, Arguments) - Creates a while loop which will keep on iterating when the condition (MUST BE A FUNCTION) returns true, where the body code is a function and the extra arguments goes into it.

  • Open_File(Name, Mode, Code, Arguments) - Opens the file with that name in that mode, where the body code is a function which will always have the file be put into it as the first argument as well as the extra arguments.

  • Invoke_Function(Function, Arguments) - Runs the given function with the given arguments.

  • Values_To_List(Values) - Converts the values given to a list and returns it.

  • Lambda_Creator(Argument_List, Return_Value) - Creates a lambda function made using a list of argument names and a string with the return expression. WARNING: Uses eval.

  • Function_Creator(Lambda_List, Return_Value = lambda: null) - Creates a basic function that takes in any amount of arguments and applies those arguments to all lambdas in the list, returning the return value lambda evaluated with all the arguments too.

  • Class_Creator(Class_Property_List, Class_Values_List, Instance_Property_List, String_Representation) - Returns a basic class with variables named after Class_Property_List and set by their corresponding value in Class_Values_List, an __init__ function that sets up variables named after Instance_Property_List, and an __str__ function which returns String_Representation formatted (Use it by making an f string without the f, Self. for instance variables, and Self.__class__. for class variables). WARNING: Uses eval.

There are also 3 values, true, false and none, which are just True, False and None (mimicking how most of python is lowercase except those 3 keywords).

Challenges

This module could create a few coding challenges such as using its functions as much as possible to make the most 'readable' code, excluding a few functions that could take it out of proportion. If you would like to make reading your code horrible better, this is the perfect opportunity!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

readable_code-1.2.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

readable_code-1.2-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file readable_code-1.2.tar.gz.

File metadata

  • Download URL: readable_code-1.2.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for readable_code-1.2.tar.gz
Algorithm Hash digest
SHA256 e3e85365b866aec0f8ac958bead09a4f2dbe5206b77323dd365c4bfe464acf85
MD5 301641314d2888ae7821bbfed09723af
BLAKE2b-256 c87ba2fab7dd32489dede595f241ffa57b44e598378080836e592155c66f75f7

See more details on using hashes here.

File details

Details for the file readable_code-1.2-py3-none-any.whl.

File metadata

  • Download URL: readable_code-1.2-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for readable_code-1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 01efa672054c0eaf221039bb8bc853e60d1ab3f7f0bb18b4405e00e00d22c294
MD5 d835efd5ca8a577ebad014864f0718ca
BLAKE2b-256 014b80573635586124c35c33d14572e1c5da0c1ee428e0c41d5e6f423bd2bf60

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page