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.

  • Function_Creator(Argument_List, Lambda_List) - Goes through each lambda function in the lambda list and runs it, feeding in all arguments from the argument list.

  • 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). Is unsafe to use in public as it uses eval for String_Representation.

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.1.tar.gz (3.8 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.1-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: readable_code-1.1.tar.gz
  • Upload date:
  • Size: 3.8 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.1.tar.gz
Algorithm Hash digest
SHA256 5c8dc4b3d82b7ee8e1de5dc868db6ae4698053a906bfede4ec8c277ff4f3f0ad
MD5 9788c5cacb63e70b020bfab0b831f2d5
BLAKE2b-256 9753c91f7996c69e56923430a951e81dc88fa723d1cd5ff50dfbb2f7e34035c5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: readable_code-1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.2 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7a53d3b625a8a09b54fe2ec411fe6633a3e2363792c95ee622cb808315b68d2b
MD5 31af17b6eef99f9d362ffa0e1a8bfc75
BLAKE2b-256 da287e3581fdcbf95392e358660540f8e4d71046765b0c0d96d1e5c092a7ac7a

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