BSEX量化交易合約軟體系統開發模式

lxqy1668發表於2023-04-26

 智慧合約是去中心化自動化的最簡單形式,並且最容易且準確地定義如下:智慧合約是一種涉及數字資產和兩個或多個參與方的機制,其中一些或所有參與方將資產放入其中,並且資產是自動進行的在發起合同時未知的某些資料的基礎上,根據公式在這些各方之間重新分配。I88智慧合約I928系統開發8024

  

  class SweepTestCase(unittest.TestCase):

  

  """Tests that the merParse class works correctly"""

  

  def setUp(self):

  

  self.parser=argparse.ArgumentParser()

  

  self.parser.add_argument(

  

  "-c","--color",

  

  type=str,

  

  choices=["yellow","blue"],

  

  required=True)

  

  try:

  

  print('try...')

  

  r=10/0

  

  print('result:',r)

  

  except ZeroDivisionError as e:

  

  print('except:',e)

  

  except Exception as ex:

  

  print("Exception:",ex)

  

  else:

  

  print("no error")

  

  finally:

  

  print('finally...')

  

  print('END')

  

  ERROR:test_required_unknown(__main__.sweep_test_case)

  

  Try to perform sweep on something that isn't an option.

  

  Traceback(most recent call last):#(I deleted some lines)

  

  File"/Users/darrin/anaconda/lib/python3.5/argparse.py",line 2310,in _check_value

  

  raise ArgumentError(action,msg%args)

  

  argparse.ArgumentError:argument-c/--color:invalid choice:'NADA'(choose from'yellow','blue')

  

  During handling of the above exception,another exception occurred:

  

  Traceback(most recent call last):#(I deleted some lines)

  

  File"/anaconda/lib/python3.5/argparse.py",line 2372,in exit

  

  _sys.exit(status)

  

  SystemExit:2


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/70020038/viewspace-2948951/,如需轉載,請註明出處,否則將追究法律責任。

相關文章