Subscribe to astonecipher's Blog        RSS Feed
-----

I have been violating the DRY Principle

Icon Leave Comment
With me working through the exercises while learning python I have violated the DRY principle and am tired or repeatedly recreating the same working code. To remedy the situation I have created two 'Use these files.'

The files are named functional and input.
function is the general file I will load from this point forward while testing my exercises.
It's use is strictly to call the needed functions I have either previously written following DRY, or to call the current exercise I am working on.

input has the all important function intake.
intake is a general function that takes in a series of inputs and adds them to a list.
Validation will be completed using the function being tested.


I am doing this because I am still learning inside of the terminal window. And EVERY exercise I have ran across has stated,
'test a series of numbers', 'input a string'. Why rewrite the input code on every exercise?

functional.py
Spoiler


input.py
Spoiler

0 Comments On This Entry

 

Trackbacks for this entry [ Trackback URL ]

There are no Trackbacks for this entry

December 2014

S M T W T F S
 123456
78910111213
14151617181920
21 22 2324252627
28293031   

Tags

Recent Entries

Search My Blog

0 user(s) viewing

0 Guests
0 member(s)
0 anonymous member(s)

Categories