[Tutor] Blockchain Dev with Python SDK

2019-07-14 Thread Matthew Zand
Hi Everyone,

I am looking for resources for learning Blockchain development using Python
SDK. I found below tutorial like below but they are too advance:
https://developer.ibm.com/recipes/tutorials/building-transaction-handler-and-processor-for-hyperledger-sawtooth-with-python-sdk/

Also, I am not familiar with OOP, will that be an issue?

Matt



-- 
Best,

DC Web Makers 
Coding Bootcamps 
240-200-6131
301-327-8773
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Multiprocessing with many input input parameters

2019-07-14 Thread Steven D'Aprano
On Fri, Jul 12, 2019 at 11:53:16AM +, Shall, Sydney via Tutor wrote:
> Thanks Mike,
> 
> But I am still not clear.

Neither is your question.

> do I write:
> 
> def f([x,y,z]) ?
> How exactly do one write the function and how does one ensure that each 
> positional argument is accounted for.

Is your function taking three seperate arguments, or a single argument 
that must be a list of exactly three items?

(1) Three seperate arguments:

def function(a, b, c):
# Write the body of the function.
...


That's all you need do, as the interpreter will ensure it is only called 
with three arguments.


(2) One list argument with three items:

def function(alist):
if isinstance(alist, list):
if len(alist) < 3:
raise ValueError("too few arguments in alist")
elif len(alist) > 3:
raise ValueError("too many arguments in alist")
else:
a, b, c = alist  # Unpack the three items from the list.
# Write the body of the function here.
...
else:
raise TypeError('expected a list')



Python will ensure your function is only called with a single argument. 
The rest is up to you.




-- 
Steven
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor