Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
here is what i am doing
#8
while thinking out some testing logic, i keep ending up with a lot of redundancy. but, i keep thinking to myself that at least this only happens once per file to be opened. that can still impact scripts intended to do things like scanning trees and opening every file to back them all up.

i'm now thinking i should avoid having the ability to mix the ways of providing various arguments and require one way be used in the API. then i can start by determine which way is being used, raise TypeError if 2 or 3 are used at same time (match or no match), and select the next test logic based on which way.

1. name and mode in positional arguments
2. name= and mode= in keyword arguments
3. name= and individual modes in keyword arguments:
    append=  (like 'a')
    binary=  (like 'b')
    exwrite= (like 'x')
    read=    (like 'r')
    text=    (like 't')
    update=  (like '+')
    write=   (like 'w')
these want true/false, anything that can follow if, not.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Messages In This Thread
here is what i am doing - by Skaperen - Jun-24-2020, 03:37 AM
RE: here is what i am doing - by Gribouillis - Jun-24-2020, 05:55 AM
RE: here is what i am doing - by Skaperen - Jun-29-2020, 05:54 PM
RE: here is what i am doing - by Skaperen - Jun-25-2020, 02:54 AM
RE: here is what i am doing - by Skaperen - Jun-25-2020, 05:48 AM
RE: here is what i am doing - by Gribouillis - Jun-25-2020, 06:33 AM
RE: here is what i am doing - by Skaperen - Jun-26-2020, 01:04 AM
RE: here is what i am doing - by Gribouillis - Jun-26-2020, 07:30 AM
RE: here is what i am doing - by Skaperen - Jun-26-2020, 05:52 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020