Open Prikalel opened 2 years ago
Also need to be valid next conditions:
from tasktree.core import Task
- Task class is present in __init__ of coresubtask = task.find_child_by(tid=92)
- find subtask by idAlso need to be valid next conditions:
from tasktree.core import Task
- Task class is present in init of coresubtask = task.find_child_by(tid=92)
- find subtask by id
Function signature
I will create a func with more simple signature for finding the child of the task by id, because this one, I'm sorry, is weird (I mean tid
name in particular).
API
Why Task.id
is not string? For example, as I used in presentation?
Why should it be string as in your presentation? As I know it's good practice to use int as id of objects. You can just increment id of previous object and here it is, new unique id.
If you'll create a func with simple signature then let me know what is this signature. BTW, I agree that this is wired name of function)
Why should it be string as in your presentation? As I know it's good practice to use int as id of objects. You can just increment id of previous object and here it is, new unique id.
ok, agree with you. int is better. i should to refactor it to int type.
See https://github.com/Chauss-LLC/task_tree_local/pull/17 for new core implementation.
API
Task.id
-> intTask.name
-> strTask.status
-> EnumTask.parent
-> TaskTask.children
-> Tuple[Task]Task.children += (Task("Arguments"), )
-> Function to create and link child.Task.parent = Task("Arguments")
-> Function to change parent.Usage