my_package1.my_module1.html 98.6 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086
<!DOCTYPE html>
<html class="writer-html5" lang="en"><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <meta charset="utf-8"><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/">

  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>my_package1.my_module1 module — PyROS 0.4.1 documentation</title>
      <link rel="stylesheet" href="my_package1.my_module1_fichiers/pygments.css" type="text/css">
      <link rel="stylesheet" href="my_package1.my_module1_fichiers/theme.css" type="text/css">
      <link rel="stylesheet" href="my_package1.my_module1_fichiers/graphviz.css" type="text/css">
  <!--[if lt IE 9]>
    <script src="_static/js/html5shiv.min.js"></script>
  <![endif]-->
  
        <script data-url_root="./" id="documentation_options" src="my_package1.my_module1_fichiers/documentation_options.js"></script>
        <script src="my_package1.my_module1_fichiers/jquery.js"></script>
        <script src="my_package1.my_module1_fichiers/underscore.js"></script>
        <script src="my_package1.my_module1_fichiers/doctools.js"></script>
    <script src="my_package1.my_module1_fichiers/theme.js"></script>
    <link rel="index" title="Index" href="file:///Users/epallier/_PROJ/_W/GFT/SOFT/PROJ_PYROS/PYROS_DOCK_Django3/doc/sourcecode/build/html/genindex.html">
    <link rel="search" title="Search" href="file:///Users/epallier/_PROJ/_W/GFT/SOFT/PROJ_PYROS/PYROS_DOCK_Django3/doc/sourcecode/build/html/search.html">
    <link rel="prev" title="my_package1 package" href="file:///Users/epallier/_PROJ/_W/GFT/SOFT/PROJ_PYROS/PYROS_DOCK_Django3/doc/sourcecode/build/html/my_package1.html"> 
</head>

<body class="wy-body-for-nav"> 
  <div class="wy-grid-for-nav">
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search">
            <a href="file:///Users/epallier/_PROJ/_W/GFT/SOFT/PROJ_PYROS/PYROS_DOCK_Django3/doc/sourcecode/build/html/index.html" class="icon icon-home"> PyROS
          </a>
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
    <input type="text" name="q" placeholder="Search docs">
    <input type="hidden" name="check_keywords" value="yes">
    <input type="hidden" name="area" value="default">
  </form>
</div>
        </div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
              <ul class="current" aria-expanded="true">
<li class="toctree-l1"><a class="reference internal" href="file:///Users/epallier/_PROJ/_W/GFT/SOFT/PROJ_PYROS/PYROS_DOCK_Django3/doc/sourcecode/build/html/celme_package.html">celme</a></li>
<li class="toctree-l1 current" aria-expanded="true"><a class="reference internal" href="file:///Users/epallier/_PROJ/_W/GFT/SOFT/PROJ_PYROS/PYROS_DOCK_Django3/doc/sourcecode/build/html/code_style_package.html"><button class="toctree-expand" title="Open/close menu"></button>my_package1</a><ul class="" aria-expanded="false">
<li class="toctree-l2 current" aria-expanded="true"><a class="reference internal" href="file:///Users/epallier/_PROJ/_W/GFT/SOFT/PROJ_PYROS/PYROS_DOCK_Django3/doc/sourcecode/build/html/my_package1.html"><button class="toctree-expand" title="Open/close menu"></button>my_package1 package</a><ul class="" aria-expanded="false">
<li class="toctree-l3 current" aria-expanded="true"><a class="reference internal" href="file:///Users/epallier/_PROJ/_W/GFT/SOFT/PROJ_PYROS/PYROS_DOCK_Django3/doc/sourcecode/build/html/my_package1.html#submodules"><button class="toctree-expand" title="Open/close menu"></button>Submodules</a><ul class="" aria-expanded="false">
<li class="toctree-l4 current" aria-expanded="true"><a class="reference internal current" href="#" aria-expanded="true">my_package1.my_module1 module</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>

        </div>
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu">
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="file:///Users/epallier/_PROJ/_W/GFT/SOFT/PROJ_PYROS/PYROS_DOCK_Django3/doc/sourcecode/build/html/index.html">PyROS</a>
      </nav>

      <div class="wy-nav-content">
        <div class="rst-content">
          <div role="navigation" aria-label="Page navigation">
  <ul class="wy-breadcrumbs">
      <li><a href="file:///Users/epallier/_PROJ/_W/GFT/SOFT/PROJ_PYROS/PYROS_DOCK_Django3/doc/sourcecode/build/html/index.html" class="icon icon-home"></a> »</li>
          <li><a href="file:///Users/epallier/_PROJ/_W/GFT/SOFT/PROJ_PYROS/PYROS_DOCK_Django3/doc/sourcecode/build/html/code_style_package.html">my_package1</a> »</li>
          <li><a href="file:///Users/epallier/_PROJ/_W/GFT/SOFT/PROJ_PYROS/PYROS_DOCK_Django3/doc/sourcecode/build/html/my_package1.html">my_package1 package</a> »</li>
      <li>my_package1.my_module1 module</li>
      <li class="wy-breadcrumbs-aside">
            <a href="file:///Users/epallier/_PROJ/_W/GFT/SOFT/PROJ_PYROS/PYROS_DOCK_Django3/doc/sourcecode/build/html/_sources/my_package1.my_module1.rst.txt" rel="nofollow"> View page source</a>
      </li>
  </ul>
  <hr>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
             
  <section id="module-my_package1.my_module1">
<span id="my-package1-my-module1-module"></span><h1>my_package1.my_module1 module<a class="headerlink" href="#module-my_package1.my_module1" title="Permalink to this headline"></a></h1>
<hr class="docutils">
<blockquote>
<div><p>This MODULE is used as a reference for Python source code style &amp; documentation</p>
<p>This file conforms to the Sphinx Napoleon syntax :
<a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/extensions/napoleon.html">https://www.sphinx-doc.org/en/master/usage/extensions/napoleon.html</a></p>
<p>VERSION 17.02.2022</p>
<p>Changes :</p>
<ul class="simple">
<li><p>added new type annotation : Literal</p></li>
<li><p>added new types : NamedTuple, Dataclass, Enum, TypedDict</p></li>
<li><p>added custom and derived Exceptions</p></li>
</ul>
</div></blockquote>
<hr class="docutils">
<dl class="py function">
<dt class="sig sig-object py" id="my_package1.my_module1.general_function_that_returns_a_float">
<span class="sig-name descname"><span class="pre">general_function_that_returns_a_float</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">arg_a</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">arg_b</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">arg_c</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1.2</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">arg_d</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="file:///Users/epallier/_PROJ/_W/GFT/SOFT/PROJ_PYROS/PYROS_DOCK_Django3/doc/sourcecode/build/html/_modules/my_package1/my_module1.html#general_function_that_returns_a_float"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#my_package1.my_module1.general_function_that_returns_a_float" title="Permalink to this definition"></a></dt>
<dd><p>This function illustrates Typehint ‘Union’ (or ‘|’)</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>arg_a</strong> (<em>int</em>) – the path of the file to wrap</p></li>
<li><p><strong>arg_b</strong> (<em>str</em><em> | </em><em>int</em>) – instance to wrap</p></li>
<li><p><strong>arg_c</strong> (<em>float</em>) – toto</p></li>
<li><p><strong>arg_d</strong> (<em>bool</em>) – whether or not to delete the file when the File instance is destructed</p></li>
</ul>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p>float</p>
</dd>
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><p>A buffered writable file descriptor</p>
</dd>
<dt class="field-even">Raises</dt>
<dd class="field-even"><ul class="simple">
<li><p><strong>AttributeError</strong> – The <code class="docutils literal notranslate"><span class="pre">Raises</span></code> section is a list of all exceptions
    that are relevant to the interface.</p></li>
<li><p><strong>ValueError</strong> – If <cite>arg_a</cite> is equal to <cite>arg_b</cite>.</p></li>
</ul>
</dd>
</dl>
<p>Usage:</p>
<blockquote>
<div><p>general_function_that_returns_a_float(arg_a=1, arg_b=”toto”)    # =&gt; OK</p>
<p>general_function_that_returns_a_float(arg_a=1, arg_b=1.2)       # =&gt; KO (float not allowed)</p>
</div></blockquote>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="my_package1.my_module1.general_function_that_returns_a_tuple_of_3_elem">
<span class="sig-name descname"><span class="pre">general_function_that_returns_a_tuple_of_3_elem</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">a</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">b</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">2</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">c</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'titi'</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="file:///Users/epallier/_PROJ/_W/GFT/SOFT/PROJ_PYROS/PYROS_DOCK_Django3/doc/sourcecode/build/html/_modules/my_package1/my_module1.html#general_function_that_returns_a_tuple_of_3_elem"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#my_package1.my_module1.general_function_that_returns_a_tuple_of_3_elem" title="Permalink to this definition"></a></dt>
<dd><p>This function illustrates Typehint ‘Tuple’ (immutable)</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>a</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code>) – the path of the file to wrap</p></li>
<li><p><strong>b</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code>) – instance to wrap</p></li>
<li><p><strong>c</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>) – toto</p></li>
</ul>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p><em>Tuple</em>[int, float, str]</p>
</dd>
</dl>
<p>Usage:</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">e</span> <span class="o">=</span> <span class="n">general_function_that_returns_a_tuple_of_3_elem</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="s1">'toto'</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e</span>
<span class="go">(1, 2, 'toto toto')</span>
</pre></div>
</div>
<p>You can name parameters if you don’t pass all of them (here we don’t pass optional parameter ‘b’) :</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">e</span> <span class="o">=</span> <span class="n">general_function_that_returns_a_tuple_of_3_elem</span><span class="p">(</span><span class="n">c</span><span class="o">=</span><span class="s1">'toto'</span><span class="p">,</span> <span class="n">a</span><span class="o">=</span><span class="mi">1</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e</span>
<span class="go">(1, 2, 'toto toto')</span>
</pre></div>
</div>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">f</span><span class="p">,</span><span class="n">g</span><span class="p">,</span><span class="n">h</span> <span class="o">=</span> <span class="n">general_function_that_returns_a_tuple_of_3_elem</span><span class="p">(</span><span class="n">c</span><span class="o">=</span><span class="s1">'toto'</span><span class="p">,</span> <span class="n">a</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">b</span><span class="o">=</span><span class="mi">2</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">f</span><span class="p">,</span><span class="n">g</span><span class="p">,</span><span class="n">h</span>
<span class="go">(1, 2, 'toto toto')</span>
</pre></div>
</div>
<dl class="field-list simple">
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p><code class="xref py py-data docutils literal notranslate"><span class="pre">Tuple</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>]</p>
</dd>
<dt class="field-even">Parameters</dt>
<dd class="field-even"><ul class="simple">
<li><p><strong>a</strong> (<em>int</em>) – </p></li>
<li><p><strong>b</strong> (<em>int</em>) – </p></li>
<li><p><strong>c</strong> (<em>str</em>) – </p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="my_package1.my_module1.square">
<span class="sig-name descname"><span class="pre">square</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">elems</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="file:///Users/epallier/_PROJ/_W/GFT/SOFT/PROJ_PYROS/PYROS_DOCK_Django3/doc/sourcecode/build/html/_modules/my_package1/my_module1.html#square"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#my_package1.my_module1.square" title="Permalink to this definition"></a></dt>
<dd><p>This function illustrates Typehint ‘Sequence’</p>
<p>Takes a Sequence (either List of Tuple) as input, and send a List as output</p>
<p>Usage:</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">square</span><span class="p">(</span> <span class="p">[</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">]</span> <span class="p">)</span>
<span class="go">[1, 4, 9]</span>
</pre></div>
</div>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">square</span><span class="p">(</span> <span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">)</span> <span class="p">)</span>
<span class="go">[1, 4, 9]</span>
</pre></div>
</div>
<dl class="field-list simple">
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p><code class="xref py py-class docutils literal notranslate"><span class="pre">List</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code>]</p>
</dd>
<dt class="field-even">Parameters</dt>
<dd class="field-even"><p><strong>elems</strong> (<em>Sequence</em><em>[</em><em>float</em><em>]</em>) – </p>
</dd>
</dl>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="my_package1.my_module1.create_deck_without_alias">
<span class="sig-name descname"><span class="pre">create_deck_without_alias</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">shuffle</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="file:///Users/epallier/_PROJ/_W/GFT/SOFT/PROJ_PYROS/PYROS_DOCK_Django3/doc/sourcecode/build/html/_modules/my_package1/my_module1.html#create_deck_without_alias"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#my_package1.my_module1.create_deck_without_alias" title="Permalink to this definition"></a></dt>
<dd><p>This function (and the next one) illustrates Typehint ‘TypeAlias’</p>
<p>Create a new deck of 52 cards</p>
<dl class="field-list simple">
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p><code class="xref py py-class docutils literal notranslate"><span class="pre">List</span></code>[<code class="xref py py-data docutils literal notranslate"><span class="pre">Tuple</span></code>[<code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>]]</p>
</dd>
<dt class="field-even">Parameters</dt>
<dd class="field-even"><p><strong>shuffle</strong> (<em>bool</em>) – </p>
</dd>
</dl>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="my_package1.my_module1.create_deck_with_alias">
<span class="sig-name descname"><span class="pre">create_deck_with_alias</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">shuffle</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="file:///Users/epallier/_PROJ/_W/GFT/SOFT/PROJ_PYROS/PYROS_DOCK_Django3/doc/sourcecode/build/html/_modules/my_package1/my_module1.html#create_deck_with_alias"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#my_package1.my_module1.create_deck_with_alias" title="Permalink to this definition"></a></dt>
<dd><p>This function (and the previous one) illustrates Typehint ‘TypeAlias’</p>
<p>Create a new deck of 52 cards</p>
<p>Card = Tuple[str, str]</p>
<p>Deck = List[Card]</p>
<p>Return Deck</p>
<dl class="field-list simple">
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p><a class="reference internal" href="#my_package1.my_module1.Deck" title="my_package1.my_module1.Deck"><code class="xref py py-class docutils literal notranslate"><span class="pre">Deck</span></code></a></p>
</dd>
<dt class="field-even">Parameters</dt>
<dd class="field-even"><p><strong>shuffle</strong> (<em>bool</em>) – </p>
</dd>
</dl>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="my_package1.my_module1.choose_from_list_of_Any_returns_a_Any">
<span class="sig-name descname"><span class="pre">choose_from_list_of_Any_returns_a_Any</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">items</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="file:///Users/epallier/_PROJ/_W/GFT/SOFT/PROJ_PYROS/PYROS_DOCK_Django3/doc/sourcecode/build/html/_modules/my_package1/my_module1.html#choose_from_list_of_Any_returns_a_Any"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#my_package1.my_module1.choose_from_list_of_Any_returns_a_Any" title="Permalink to this definition"></a></dt>
<dd><p>This function illustrates Typehint ‘Generics’</p>
<p>Option1 (BAD) : avoid using ‘Any’ because too general</p>
<dl class="field-list simple">
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p><code class="xref py py-data docutils literal notranslate"><span class="pre">Any</span></code></p>
</dd>
<dt class="field-even">Parameters</dt>
<dd class="field-even"><p><strong>items</strong> (<em>Sequence</em><em>[</em><em>Any</em><em>]</em>) – </p>
</dd>
</dl>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="my_package1.my_module1.choose_from_list_of_a_specific_type_returns_same_type">
<span class="sig-name descname"><span class="pre">choose_from_list_of_a_specific_type_returns_same_type</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">items</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="file:///Users/epallier/_PROJ/_W/GFT/SOFT/PROJ_PYROS/PYROS_DOCK_Django3/doc/sourcecode/build/html/_modules/my_package1/my_module1.html#choose_from_list_of_a_specific_type_returns_same_type"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#my_package1.my_module1.choose_from_list_of_a_specific_type_returns_same_type" title="Permalink to this definition"></a></dt>
<dd><p>This function illustrates Typehint ‘Generics’</p>
<p>Option2 (BETTER) : prefer ‘TypeVar’ instead of ‘Any’</p>
<p>T = TypeVar(“T”)</p>
<dl class="field-list simple">
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p><code class="xref py py-class docutils literal notranslate"><span class="pre">TypeVar</span></code>(<code class="docutils literal notranslate"><span class="pre">T</span></code>)</p>
</dd>
<dt class="field-even">Parameters</dt>
<dd class="field-even"><p><strong>items</strong> (<em>Sequence</em><em>[</em><em>my_package1.my_module1.T</em><em>]</em>) – </p>
</dd>
</dl>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="my_package1.my_module1.choose_from_list_of_a_specific_constrained_type_returns_same_type">
<span class="sig-name descname"><span class="pre">choose_from_list_of_a_specific_constrained_type_returns_same_type</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">items</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="file:///Users/epallier/_PROJ/_W/GFT/SOFT/PROJ_PYROS/PYROS_DOCK_Django3/doc/sourcecode/build/html/_modules/my_package1/my_module1.html#choose_from_list_of_a_specific_constrained_type_returns_same_type"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#my_package1.my_module1.choose_from_list_of_a_specific_constrained_type_returns_same_type" title="Permalink to this definition"></a></dt>
<dd><p>This function illustrates Typehint ‘Generics’</p>
<p>Option3 (still BETTER) : use a ‘constrained TypeVar’</p>
<p>T_str_flt = TypeVar(“T_str_flt”, str, float)</p>
<p>(you could name ‘T_str_flt’ as you want, for example, ‘Choosable’…)</p>
<p>=&gt; the function accepts only sequence of str or float:</p>
<ul class="simple">
<li><p>if str: return str</p></li>
<li><p>if float: return float</p></li>
</ul>
<p>Usage:</p>
<p>choose([“Guido”, “Jukka”, “Ivan”])    =&gt; str, OK</p>
<p>choose([1, 2, 3])                =&gt; float, OK (car int subtype of float)</p>
<p>choose([True, 42, 3.14])        =&gt; float, OK (car bool subtype of int which is subtype of float)</p>
<p>choose([“Python”, 3, 7])            =&gt; object, KO (rejected)</p>
<dl class="field-list simple">
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p><code class="xref py py-class docutils literal notranslate"><span class="pre">TypeVar</span></code>(<code class="docutils literal notranslate"><span class="pre">T_str_flt</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">float</span></code>)</p>
</dd>
<dt class="field-even">Parameters</dt>
<dd class="field-even"><p><strong>items</strong> (<em>Sequence</em><em>[</em><em>my_package1.my_module1.T_str_flt</em><em>]</em>) – </p>
</dd>
</dl>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="my_package1.my_module1.create_greeting">
<span class="sig-name descname"><span class="pre">create_greeting</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">congrat</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">name</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">nb</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="file:///Users/epallier/_PROJ/_W/GFT/SOFT/PROJ_PYROS/PYROS_DOCK_Django3/doc/sourcecode/build/html/_modules/my_package1/my_module1.html#create_greeting"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#my_package1.my_module1.create_greeting" title="Permalink to this definition"></a></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></p>
</dd>
<dt class="field-even">Parameters</dt>
<dd class="field-even"><ul class="simple">
<li><p><strong>congrat</strong> (<em>str</em>) – </p></li>
<li><p><strong>name</strong> (<em>str</em>) – </p></li>
<li><p><strong>nb</strong> (<em>int</em>) – </p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="my_package1.my_module1.do_twice">
<span class="sig-name descname"><span class="pre">do_twice</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">func</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">arg1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">arg2</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">arg3</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="file:///Users/epallier/_PROJ/_W/GFT/SOFT/PROJ_PYROS/PYROS_DOCK_Django3/doc/sourcecode/build/html/_modules/my_package1/my_module1.html#do_twice"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#my_package1.my_module1.do_twice" title="Permalink to this definition"></a></dt>
<dd><p>This function illustrates Typehint ‘Callable’</p>
<p>Usage:</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">do_twice</span><span class="p">(</span><span class="n">create_greeting</span><span class="p">,</span> <span class="s2">"Hello"</span><span class="p">,</span> <span class="s2">"Jekyll"</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span>
<span class="go">Hello Jekyll 1</span>
<span class="go">Hello Jekyll 1</span>
</pre></div>
</div>
<dl class="field-list simple">
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">None</span></code></p>
</dd>
<dt class="field-even">Parameters</dt>
<dd class="field-even"><ul class="simple">
<li><p><strong>func</strong> (<em>Callable</em><em>[</em><em>[</em><em>str</em><em>, </em><em>str</em><em>, </em><em>int</em><em>]</em><em>, </em><em>str</em><em>]</em>) – </p></li>
<li><p><strong>arg1</strong> (<em>str</em>) – </p></li>
<li><p><strong>arg2</strong> (<em>str</em>) – </p></li>
<li><p><strong>arg3</strong> (<em>int</em>) – </p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="my_package1.my_module1.validate_simple">
<span class="sig-name descname"><span class="pre">validate_simple</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">data</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="file:///Users/epallier/_PROJ/_W/GFT/SOFT/PROJ_PYROS/PYROS_DOCK_Django3/doc/sourcecode/build/html/_modules/my_package1/my_module1.html#validate_simple"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#my_package1.my_module1.validate_simple" title="Permalink to this definition"></a></dt>
<dd><p>This function illustrates Typehint ‘Literal’ (new in 3.8)</p>
<p>=&gt; should always return True</p>
<dl class="field-list simple">
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p><code class="xref py py-data docutils literal notranslate"><span class="pre">Literal</span></code>[True]</p>
</dd>
<dt class="field-even">Parameters</dt>
<dd class="field-even"><p><strong>data</strong> (<em>Any</em>) – </p>
</dd>
</dl>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="my_package1.my_module1.open_helper">
<span class="sig-name descname"><span class="pre">open_helper</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">file</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mode</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="file:///Users/epallier/_PROJ/_W/GFT/SOFT/PROJ_PYROS/PYROS_DOCK_Django3/doc/sourcecode/build/html/_modules/my_package1/my_module1.html#open_helper"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#my_package1.my_module1.open_helper" title="Permalink to this definition"></a></dt>
<dd><p>This function illustrates Typehint ‘Literal’ (new in 3.8)</p>
<p>(Type alias :)</p>
<p>MODE = Literal[‘r’, ‘rb’, ‘w’, ‘wb’]</p>
<p>Usage:</p>
<p>OK :</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">open_helper</span><span class="p">(</span><span class="s1">'/some/path'</span><span class="p">,</span> <span class="s1">'r'</span><span class="p">)</span>
</pre></div>
</div>
<p>Error :</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">open_helper</span><span class="p">(</span><span class="s1">'/other/path'</span><span class="p">,</span> <span class="s1">'typo'</span><span class="p">)</span>
</pre></div>
</div>
<dl class="field-list simple">
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></p>
</dd>
<dt class="field-even">Parameters</dt>
<dd class="field-even"><ul class="simple">
<li><p><strong>file</strong> (<em>str</em>) – </p></li>
<li><p><strong>mode</strong> (<em>Literal</em><em>[</em><em>'r'</em><em>, </em><em>'rb'</em><em>, </em><em>'w'</em><em>, </em><em>'wb'</em><em>]</em>) – </p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="py exception">
<dt class="sig sig-object py" id="my_package1.my_module1.DCCNotFoundException">
<em class="property"><span class="pre">exception</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">DCCNotFoundException</span></span><a class="reference internal" href="file:///Users/epallier/_PROJ/_W/GFT/SOFT/PROJ_PYROS/PYROS_DOCK_Django3/doc/sourcecode/build/html/_modules/my_package1/my_module1.html#DCCNotFoundException"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#my_package1.my_module1.DCCNotFoundException" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">Exception</span></code></p>
<p>Raised when a specific DCC is not available</p>
</dd></dl>

<dl class="py exception">
<dt class="sig sig-object py" id="my_package1.my_module1.UnknownGenericCmdArgException">
<em class="property"><span class="pre">exception</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">UnknownGenericCmdArgException</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">arg</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="file:///Users/epallier/_PROJ/_W/GFT/SOFT/PROJ_PYROS/PYROS_DOCK_Django3/doc/sourcecode/build/html/_modules/my_package1/my_module1.html#UnknownGenericCmdArgException"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#my_package1.my_module1.UnknownGenericCmdArgException" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">Exception</span></code></p>
<p>Raised when a GENERIC cmd argument is not recognized by the controller (no native cmd available for the generic cmd)</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>name</strong> (<em>str</em>) – </p></li>
<li><p><strong>arg</strong> (<em>str</em>) – </p></li>
</ul>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="my_package1.my_module1.UnknownGenericCmdArgException.__str__">
<span class="sig-name descname"><span class="pre">__str__</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="file:///Users/epallier/_PROJ/_W/GFT/SOFT/PROJ_PYROS/PYROS_DOCK_Django3/doc/sourcecode/build/html/_modules/my_package1/my_module1.html#UnknownGenericCmdArgException.__str__"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#my_package1.my_module1.UnknownGenericCmdArgException.__str__" title="Permalink to this definition"></a></dt>
<dd><p>Return str(self).</p>
</dd></dl>

</dd></dl>

<dl class="py exception">
<dt class="sig sig-object py" id="my_package1.my_module1.UnknownNativeCmdException">
<em class="property"><span class="pre">exception</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">UnknownNativeCmdException</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="file:///Users/epallier/_PROJ/_W/GFT/SOFT/PROJ_PYROS/PYROS_DOCK_Django3/doc/sourcecode/build/html/_modules/my_package1/my_module1.html#UnknownNativeCmdException"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#my_package1.my_module1.UnknownNativeCmdException" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">Exception</span></code></p>
<p>Raised when a NATIVE command name is not recognized by the controller</p>
</dd></dl>

<dl class="py exception">
<dt class="sig sig-object py" id="my_package1.my_module1.UnimplementedGenericCmdException">
<em class="property"><span class="pre">exception</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">UnimplementedGenericCmdException</span></span><a class="reference internal" href="file:///Users/epallier/_PROJ/_W/GFT/SOFT/PROJ_PYROS/PYROS_DOCK_Django3/doc/sourcecode/build/html/_modules/my_package1/my_module1.html#UnimplementedGenericCmdException"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#my_package1.my_module1.UnimplementedGenericCmdException" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">Exception</span></code></p>
<p>Raised when a GENERIC cmd has no implementation in the controller (no native cmd available for the generic cmd)</p>
<dl class="py method">
<dt class="sig sig-object py" id="my_package1.my_module1.UnimplementedGenericCmdException.__str__">
<span class="sig-name descname"><span class="pre">__str__</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="file:///Users/epallier/_PROJ/_W/GFT/SOFT/PROJ_PYROS/PYROS_DOCK_Django3/doc/sourcecode/build/html/_modules/my_package1/my_module1.html#UnimplementedGenericCmdException.__str__"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#my_package1.my_module1.UnimplementedGenericCmdException.__str__" title="Permalink to this definition"></a></dt>
<dd><p>Return str(self).</p>
</dd></dl>

</dd></dl>

<dl class="py exception">
<dt class="sig sig-object py" id="my_package1.my_module1.MyImprovedException">
<em class="property"><span class="pre">exception</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">MyImprovedException</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">error_msg</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">specific_msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="file:///Users/epallier/_PROJ/_W/GFT/SOFT/PROJ_PYROS/PYROS_DOCK_Django3/doc/sourcecode/build/html/_modules/my_package1/my_module1.html#MyImprovedException"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#my_package1.my_module1.MyImprovedException" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">Exception</span></code></p>
<p>Improved Exeption class with predefined list of standard error messages, and optional specific message</p>
<p>Usage:</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">e</span> <span class="o">=</span> <span class="n">MyImprovedException</span><span class="p">(</span><span class="n">MyImprovedException</span><span class="o">.</span><span class="n">ERROR_BAD_PARAM</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e</span><span class="o">.</span><span class="n">error_msg</span>
<span class="go">'Bad Parameter'</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e</span>
<span class="go">MyImprovedException('Bad Parameter')</span>
<span class="gp">&gt;&gt;&gt; </span><span class="nb">print</span><span class="p">(</span><span class="n">e</span><span class="p">)</span>
<span class="go">(MyImprovedException): Bad Parameter</span>
</pre></div>
</div>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">e</span> <span class="o">=</span> <span class="n">MyImprovedException</span><span class="p">(</span><span class="n">MyImprovedException</span><span class="o">.</span><span class="n">ERROR_BAD_PARAM</span><span class="p">,</span> <span class="s2">"my specific message added"</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">e</span>
<span class="go">MyImprovedException('Bad Parameter', 'my specific message added')</span>
<span class="gp">&gt;&gt;&gt; </span><span class="nb">print</span><span class="p">(</span><span class="n">e</span><span class="p">)</span>
<span class="go">(MyImprovedException): Bad Parameter ; Specific message: my specific message added</span>
</pre></div>
</div>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>error_msg</strong> (<em>str</em>) – </p></li>
<li><p><strong>specific_msg</strong> (<em>str</em>) – </p></li>
</ul>
</dd>
</dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="my_package1.my_module1.MyImprovedException.ERROR_UNDEFINED_PARAM">
<span class="sig-name descname"><span class="pre">ERROR_UNDEFINED_PARAM</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'Parameter</span> <span class="pre">not</span> <span class="pre">defined'</span></em><a class="headerlink" href="#my_package1.my_module1.MyImprovedException.ERROR_UNDEFINED_PARAM" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="my_package1.my_module1.MyImprovedException.ERROR_BAD_PARAM">
<span class="sig-name descname"><span class="pre">ERROR_BAD_PARAM</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'Bad</span> <span class="pre">Parameter'</span></em><a class="headerlink" href="#my_package1.my_module1.MyImprovedException.ERROR_BAD_PARAM" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="my_package1.my_module1.MyImprovedException.ERROR_MISSING_PARAM">
<span class="sig-name descname"><span class="pre">ERROR_MISSING_PARAM</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'a</span> <span class="pre">Parameter</span> <span class="pre">is</span> <span class="pre">missing'</span></em><a class="headerlink" href="#my_package1.my_module1.MyImprovedException.ERROR_MISSING_PARAM" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="my_package1.my_module1.MyImprovedException.ERROR_TOO_MANY_PARAM">
<span class="sig-name descname"><span class="pre">ERROR_TOO_MANY_PARAM</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'Too</span> <span class="pre">many</span> <span class="pre">Parameters'</span></em><a class="headerlink" href="#my_package1.my_module1.MyImprovedException.ERROR_TOO_MANY_PARAM" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="my_package1.my_module1.MyImprovedException.__str__">
<span class="sig-name descname"><span class="pre">__str__</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="file:///Users/epallier/_PROJ/_W/GFT/SOFT/PROJ_PYROS/PYROS_DOCK_Django3/doc/sourcecode/build/html/_modules/my_package1/my_module1.html#MyImprovedException.__str__"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#my_package1.my_module1.MyImprovedException.__str__" title="Permalink to this definition"></a></dt>
<dd><p>Return str(self).</p>
</dd></dl>

</dd></dl>

<dl class="py exception">
<dt class="sig sig-object py" id="my_package1.my_module1.MyOwnDerivedException">
<em class="property"><span class="pre">exception</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">MyOwnDerivedException</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">error_msg</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">specific_msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="file:///Users/epallier/_PROJ/_W/GFT/SOFT/PROJ_PYROS/PYROS_DOCK_Django3/doc/sourcecode/build/html/_modules/my_package1/my_module1.html#MyOwnDerivedException"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#my_package1.my_module1.MyOwnDerivedException" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#my_package1.my_module1.MyImprovedException" title="my_package1.my_module1.MyImprovedException"><code class="xref py py-class docutils literal notranslate"><span class="pre">my_package1.my_module1.MyImprovedException</span></code></a></p>
<p>Usage:</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="k">try</span><span class="p">:</span>
<span class="gp">... </span>    <span class="nb">print</span><span class="p">(</span><span class="s2">"doing something dangerous..."</span><span class="p">)</span>
<span class="gp">... </span>    <span class="k">raise</span> <span class="n">MyOwnDerivedException</span><span class="p">(</span><span class="n">MyOwnDerivedException</span><span class="o">.</span><span class="n">ERROR_MISSING_PARAM</span><span class="p">)</span>
<span class="gp">... </span><span class="k">except</span> <span class="n">MyOwnDerivedException</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
<span class="gp">... </span>    <span class="nb">print</span><span class="p">(</span><span class="n">e</span><span class="p">)</span>
<span class="go">doing something dangerous...</span>
<span class="go">(MyOwnDerivedException): a Parameter is missing</span>
</pre></div>
</div>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="k">try</span><span class="p">:</span>
<span class="gp">... </span>    <span class="nb">print</span><span class="p">(</span><span class="s2">"doing something dangerous..."</span><span class="p">)</span>
<span class="gp">... </span>    <span class="k">raise</span> <span class="n">MyOwnDerivedException</span><span class="p">(</span><span class="n">MyOwnDerivedException</span><span class="o">.</span><span class="n">ERROR_NEW_CASE2</span><span class="p">,</span> <span class="s1">'my own special message'</span><span class="p">)</span>
<span class="gp">... </span><span class="k">except</span> <span class="n">MyImprovedException</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>  <span class="c1"># we can use superclass also</span>
<span class="gp">... </span>    <span class="nb">print</span><span class="p">(</span><span class="n">e</span><span class="p">)</span>
<span class="go">doing something dangerous...</span>
<span class="go">(MyOwnDerivedException): Nouveau cas d'erreur 2 ; Specific message: my own special message</span>
</pre></div>
</div>
<p>General example :</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="k">try</span><span class="p">:</span>
<span class="gp">... </span>    <span class="c1"># do something</span>
<span class="gp">... </span>    <span class="k">pass</span>
<span class="gp">...</span>
<span class="gp">... </span><span class="k">except</span> <span class="ne">ValueError</span><span class="p">:</span>
<span class="gp">... </span>    <span class="c1"># handle ValueError exception</span>
<span class="gp">... </span>    <span class="k">pass</span>
<span class="gp">...</span>
<span class="gp">... </span><span class="k">except</span> <span class="p">(</span><span class="ne">TypeError</span><span class="p">,</span> <span class="ne">ZeroDivisionError</span><span class="p">):</span>
<span class="gp">... </span>    <span class="c1"># handle multiple exceptions</span>
<span class="gp">... </span>    <span class="c1"># TypeError and ZeroDivisionError</span>
<span class="gp">... </span>    <span class="k">pass</span>
<span class="gp">...</span>
<span class="gp">... </span><span class="k">except</span><span class="p">:</span>
<span class="gp">... </span>    <span class="c1"># handle all other exceptions</span>
<span class="gp">... </span>    <span class="k">pass</span>
</pre></div>
</div>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>error_msg</strong> (<em>str</em>) – </p></li>
<li><p><strong>specific_msg</strong> (<em>str</em>) – </p></li>
</ul>
</dd>
</dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="my_package1.my_module1.MyOwnDerivedException.ERROR_NEW_CASE1">
<span class="sig-name descname"><span class="pre">ERROR_NEW_CASE1</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">"Nouveau</span> <span class="pre">cas</span> <span class="pre">d'erreur</span> <span class="pre">1"</span></em><a class="headerlink" href="#my_package1.my_module1.MyOwnDerivedException.ERROR_NEW_CASE1" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="my_package1.my_module1.MyOwnDerivedException.ERROR_NEW_CASE2">
<span class="sig-name descname"><span class="pre">ERROR_NEW_CASE2</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">"Nouveau</span> <span class="pre">cas</span> <span class="pre">d'erreur</span> <span class="pre">2"</span></em><a class="headerlink" href="#my_package1.my_module1.MyOwnDerivedException.ERROR_NEW_CASE2" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="my_package1.my_module1.MySuperClass1">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">MySuperClass1</span></span><a class="reference internal" href="file:///Users/epallier/_PROJ/_W/GFT/SOFT/PROJ_PYROS/PYROS_DOCK_Django3/doc/sourcecode/build/html/_modules/my_package1/my_module1.html#MySuperClass1"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#my_package1.my_module1.MySuperClass1" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="my_package1.my_module1.MySuperClass2">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">MySuperClass2</span></span><a class="reference internal" href="file:///Users/epallier/_PROJ/_W/GFT/SOFT/PROJ_PYROS/PYROS_DOCK_Django3/doc/sourcecode/build/html/_modules/my_package1/my_module1.html#MySuperClass2"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#my_package1.my_module1.MySuperClass2" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="my_package1.my_module1.MySimpleClass">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">MySimpleClass</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">a</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">b</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="file:///Users/epallier/_PROJ/_W/GFT/SOFT/PROJ_PYROS/PYROS_DOCK_Django3/doc/sourcecode/build/html/_modules/my_package1/my_module1.html#MySimpleClass"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#my_package1.my_module1.MySimpleClass" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#my_package1.my_module1.MySuperClass1" title="my_package1.my_module1.MySuperClass1"><code class="xref py py-class docutils literal notranslate"><span class="pre">my_package1.my_module1.MySuperClass1</span></code></a>, <a class="reference internal" href="#my_package1.my_module1.MySuperClass2" title="my_package1.my_module1.MySuperClass2"><code class="xref py py-class docutils literal notranslate"><span class="pre">my_package1.my_module1.MySuperClass2</span></code></a></p>
<p>a Class with multi-inheritance</p>
<p>blabla</p>
<p>blabla</p>
<p>La methode __init__ doit toujours retourner “None”</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>a</strong> (<code class="xref py py-class docutils literal notranslate"><span class="pre">int</span></code>) – blabla</p></li>
<li><p><strong>b</strong> (<em>float</em>) – </p></li>
</ul>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p>None</p>
</dd>
</dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="my_package1.my_module1.MySimpleClass.names">
<span class="sig-name descname"><span class="pre">names</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">List</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">]</span></span></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">['Guido',</span> <span class="pre">'Jukka',</span> <span class="pre">'Ivan']</span></em><a class="headerlink" href="#my_package1.my_module1.MySimpleClass.names" title="Permalink to this definition"></a></dt>
<dd><p>List is mutable</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="my_package1.my_module1.MySimpleClass.version">
<span class="sig-name descname"><span class="pre">version</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">Tuple</span><span class="p"><span class="pre">[</span></span><span class="pre">int</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">int</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">int</span><span class="p"><span class="pre">]</span></span></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">(3,</span> <span class="pre">7,</span> <span class="pre">1)</span></em><a class="headerlink" href="#my_package1.my_module1.MySimpleClass.version" title="Permalink to this definition"></a></dt>
<dd><p>Tuple is IMMutable</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="my_package1.my_module1.MySimpleClass.options">
<span class="sig-name descname"><span class="pre">options</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">Dict</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">bool</span><span class="p"><span class="pre">]</span></span></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">{'capitalize':</span> <span class="pre">True,</span> <span class="pre">'centered':</span> <span class="pre">False}</span></em><a class="headerlink" href="#my_package1.my_module1.MySimpleClass.options" title="Permalink to this definition"></a></dt>
<dd><p>Dict (is mutable)</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="my_package1.my_module1.MySimpleClass.my_attr1">
<span class="sig-name descname"><span class="pre">my_attr1</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">dict</span></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">{}</span></em><a class="headerlink" href="#my_package1.my_module1.MySimpleClass.my_attr1" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="my_package1.my_module1.MySimpleClass.current_file">
<span class="sig-name descname"><span class="pre">current_file</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">None</span></em><a class="headerlink" href="#my_package1.my_module1.MySimpleClass.current_file" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="my_package1.my_module1.MySimpleClass.__str__">
<span class="sig-name descname"><span class="pre">__str__</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="file:///Users/epallier/_PROJ/_W/GFT/SOFT/PROJ_PYROS/PYROS_DOCK_Django3/doc/sourcecode/build/html/_modules/my_package1/my_module1.html#MySimpleClass.__str__"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#my_package1.my_module1.MySimpleClass.__str__" title="Permalink to this definition"></a></dt>
<dd><p>La methode __str__ doit toujours retourner “str”</p>
<dl class="field-list simple">
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></p>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="my_package1.my_module1.MySimpleClass.my_method2">
<span class="sig-name descname"><span class="pre">my_method2</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">a</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">b</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="file:///Users/epallier/_PROJ/_W/GFT/SOFT/PROJ_PYROS/PYROS_DOCK_Django3/doc/sourcecode/build/html/_modules/my_package1/my_module1.html#MySimpleClass.my_method2"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#my_package1.my_module1.MySimpleClass.my_method2" title="Permalink to this definition"></a></dt>
<dd><p>Method that returns nothing</p>
<dl class="field-list simple">
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">None</span></code></p>
</dd>
<dt class="field-even">Parameters</dt>
<dd class="field-even"><ul class="simple">
<li><p><strong>a</strong> (<em>int</em>) – </p></li>
<li><p><strong>b</strong> (<em>float</em>) – </p></li>
</ul>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="my_package1.my_module1.Person">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">Person</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">age</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="file:///Users/epallier/_PROJ/_W/GFT/SOFT/PROJ_PYROS/PYROS_DOCK_Django3/doc/sourcecode/build/html/_modules/my_package1/my_module1.html#Person"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#my_package1.my_module1.Person" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Class to create a person, in several ways (several Factory methods)</p>
<p>=&gt; Illustrate difference btw static and class methods</p>
<p>Usage:</p>
<ol class="arabic simple">
<li><p>Classic Constructor :</p></li>
</ol>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">person1</span> <span class="o">=</span> <span class="n">Person</span><span class="p">(</span><span class="s1">'Alfredo'</span><span class="p">,</span> <span class="mi">21</span><span class="p">)</span>
</pre></div>
</div>
<ol class="arabic simple" start="2">
<li><p>Class method (Factory) :</p></li>
</ol>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">person2</span> <span class="o">=</span> <span class="n">Person</span><span class="o">.</span><span class="n">fromBirthYear</span><span class="p">(</span><span class="s1">'Peter'</span><span class="p">,</span> <span class="mi">2000</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">person2</span><span class="o">.</span><span class="n">age</span>
<span class="go">22</span>
</pre></div>
</div>
<ol class="arabic simple" start="3">
<li><p>Another class method (Factory) :</p></li>
</ol>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">person3</span> <span class="o">=</span> <span class="n">Person</span><span class="o">.</span><span class="n">twin</span><span class="p">(</span><span class="s1">'John'</span><span class="p">,</span> <span class="n">person2</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">person3</span><span class="o">.</span><span class="n">age</span> <span class="o">==</span> <span class="n">person2</span><span class="o">.</span><span class="n">age</span>
<span class="go">True</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">person3</span><span class="o">.</span><span class="n">name</span> <span class="o">==</span> <span class="n">person2</span><span class="o">.</span><span class="n">name</span>
<span class="go">False</span>
</pre></div>
</div>
<ol class="arabic simple" start="4">
<li><p>Static method (does not need access to the class attributes or methods) :</p></li>
</ol>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">Person</span><span class="o">.</span><span class="n">isAdult</span><span class="p">(</span><span class="mi">22</span><span class="p">)</span>
<span class="go">True</span>
</pre></div>
</div>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>name</strong> (<em>str</em>) – </p></li>
<li><p><strong>age</strong> (<em>int</em>) – </p></li>
</ul>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p>None</p>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="my_package1.my_module1.Person.fromBirthYear">
<em class="property"><span class="pre">classmethod</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">fromBirthYear</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">year</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="file:///Users/epallier/_PROJ/_W/GFT/SOFT/PROJ_PYROS/PYROS_DOCK_Django3/doc/sourcecode/build/html/_modules/my_package1/my_module1.html#Person.fromBirthYear"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#my_package1.my_module1.Person.fromBirthYear" title="Permalink to this definition"></a></dt>
<dd><p>A class method to create a Person object by birth year</p>
<p>NB : return type ‘Person’ is possible because of: ‘from __future__ import annotations’</p>
<dl class="field-list simple">
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p><a class="reference internal" href="#my_package1.my_module1.Person" title="my_package1.my_module1.Person"><code class="xref py py-class docutils literal notranslate"><span class="pre">Person</span></code></a></p>
</dd>
<dt class="field-even">Parameters</dt>
<dd class="field-even"><ul class="simple">
<li><p><strong>name</strong> (<em>str</em>) – </p></li>
<li><p><strong>year</strong> (<em>int</em>) – </p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="my_package1.my_module1.Person.twin">
<em class="property"><span class="pre">classmethod</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">twin</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">p</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="file:///Users/epallier/_PROJ/_W/GFT/SOFT/PROJ_PYROS/PYROS_DOCK_Django3/doc/sourcecode/build/html/_modules/my_package1/my_module1.html#Person.twin"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#my_package1.my_module1.Person.twin" title="Permalink to this definition"></a></dt>
<dd><p>A class method to create a Person object from another</p>
<dl class="field-list simple">
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p><a class="reference internal" href="#my_package1.my_module1.Person" title="my_package1.my_module1.Person"><code class="xref py py-class docutils literal notranslate"><span class="pre">Person</span></code></a></p>
</dd>
<dt class="field-even">Parameters</dt>
<dd class="field-even"><ul class="simple">
<li><p><strong>name</strong> (<em>str</em>) – </p></li>
<li><p><strong>p</strong> (<a class="reference internal" href="#my_package1.my_module1.Person" title="my_package1.my_module1.Person"><em>my_package1.my_module1.Person</em></a>) – </p></li>
</ul>
</dd>
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="my_package1.my_module1.Person.isAdult">
<em class="property"><span class="pre">static</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">isAdult</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">age</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="file:///Users/epallier/_PROJ/_W/GFT/SOFT/PROJ_PYROS/PYROS_DOCK_Django3/doc/sourcecode/build/html/_modules/my_package1/my_module1.html#Person.isAdult"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#my_package1.my_module1.Person.isAdult" title="Permalink to this definition"></a></dt>
<dd><p>A static method to check if a Person is adult or not</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>age</strong> (<em>int</em>) – </p>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="my_package1.my_module1.Employee">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">Employee</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">first_name</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">last_name</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">jobs</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">list</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">country</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">str</span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">'France'</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="file:///Users/epallier/_PROJ/_W/GFT/SOFT/PROJ_PYROS/PYROS_DOCK_Django3/doc/sourcecode/build/html/_modules/my_package1/my_module1.html#Employee"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#my_package1.my_module1.Employee" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">tuple</span></code></p>
<p>Illustrates usage of collections.namedtuple &amp; typing.NamedTuple</p>
<p>See <a class="reference external" href="https://towardsdatascience.com/what-are-named-tuples-in-python-59dc7bd15680">https://towardsdatascience.com/what-are-named-tuples-in-python-59dc7bd15680</a></p>
<p>See <a class="reference external" href="https://www.netjstech.com/2020/01/named-tuple-python.html">https://www.netjstech.com/2020/01/named-tuple-python.html</a></p>
<p>Usage:</p>
<ol class="arabic simple">
<li><p>Here we use typing.NamedTuple :</p></li>
</ol>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">andrew</span> <span class="o">=</span> <span class="n">Employee</span><span class="p">(</span><span class="s1">'Andrew'</span><span class="p">,</span> <span class="s1">'Brown'</span><span class="p">,</span> <span class="p">[</span><span class="s1">'Develoer'</span><span class="p">,</span> <span class="s1">'Manager'</span><span class="p">],</span> <span class="s1">'US'</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="nb">print</span><span class="p">(</span><span class="n">andrew</span><span class="p">)</span>
<span class="go">Employee(first_name='Andrew', last_name='Brown', jobs=['Develoer', 'Manager'], country='US')</span>
</pre></div>
</div>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">alice</span> <span class="o">=</span> <span class="n">Employee</span><span class="p">(</span><span class="n">first_name</span><span class="o">=</span><span class="s1">'Alice'</span><span class="p">,</span> <span class="n">last_name</span><span class="o">=</span><span class="s1">'Stevenson'</span><span class="p">,</span> <span class="n">jobs</span><span class="o">=</span><span class="p">[</span><span class="s1">'Product Owner'</span><span class="p">])</span>
<span class="gp">&gt;&gt;&gt; </span><span class="nb">print</span><span class="p">(</span><span class="n">alice</span><span class="p">)</span>
<span class="go">Employee(first_name='Alice', last_name='Stevenson', jobs=['Product Owner'], country='France')</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">alice</span><span class="o">.</span><span class="n">last_name</span>
<span class="go">'Stevenson'</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">alice</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span>
<span class="go">'Stevenson'</span>
<span class="gp">&gt;&gt;&gt; </span><span class="k">for</span> <span class="n">attr</span> <span class="ow">in</span> <span class="n">alice</span><span class="p">:</span> <span class="nb">print</span><span class="p">(</span><span class="n">attr</span><span class="p">)</span>
<span class="go">Alice</span>
<span class="go">Stevenson</span>
<span class="go">['Product Owner']</span>
<span class="go">France</span>
</pre></div>
</div>
<ol class="arabic simple" start="2">
<li><p>Here we define the same Employee as above, but using collections.namedtuple :</p></li>
</ol>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">collections</span> <span class="kn">import</span> <span class="n">namedtuple</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Employee</span> <span class="o">=</span> <span class="n">namedtuple</span><span class="p">(</span><span class="s1">'Employee'</span><span class="p">,</span> <span class="s1">'first_name last_name jobs country'</span><span class="p">)</span>
</pre></div>
</div>
<p>or :</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">Employee</span> <span class="o">=</span> <span class="n">namedtuple</span><span class="p">(</span><span class="s1">'Employee'</span><span class="p">,</span> <span class="p">[</span><span class="s1">'first_name'</span><span class="p">,</span> <span class="s1">'last_name'</span><span class="p">,</span> <span class="s1">'jobs'</span><span class="p">,</span> <span class="s1">'country'</span><span class="p">])</span>
</pre></div>
</div>
<p>Create new instance of Employee(first_name, last_name, jobs, country)</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>first_name</strong> (<em>str</em>) – </p></li>
<li><p><strong>last_name</strong> (<em>str</em>) – </p></li>
<li><p><strong>jobs</strong> (<em>list</em>) – </p></li>
<li><p><strong>country</strong> (<em>str</em>) – </p></li>
</ul>
</dd>
</dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="my_package1.my_module1.Employee.first_name">
<span class="sig-name descname"><span class="pre">first_name</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">str</span></em><a class="headerlink" href="#my_package1.my_module1.Employee.first_name" title="Permalink to this definition"></a></dt>
<dd><p>Alias for field number 0</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="my_package1.my_module1.Employee.last_name">
<span class="sig-name descname"><span class="pre">last_name</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">str</span></em><a class="headerlink" href="#my_package1.my_module1.Employee.last_name" title="Permalink to this definition"></a></dt>
<dd><p>Alias for field number 1</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="my_package1.my_module1.Employee.jobs">
<span class="sig-name descname"><span class="pre">jobs</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">list</span></em><a class="headerlink" href="#my_package1.my_module1.Employee.jobs" title="Permalink to this definition"></a></dt>
<dd><p>Alias for field number 2</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="my_package1.my_module1.Employee.country">
<span class="sig-name descname"><span class="pre">country</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">str</span></em><a class="headerlink" href="#my_package1.my_module1.Employee.country" title="Permalink to this definition"></a></dt>
<dd><p>Alias for field number 3</p>
</dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="my_package1.my_module1.Point2D">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">Point2D</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="file:///Users/epallier/_PROJ/_W/GFT/SOFT/PROJ_PYROS/PYROS_DOCK_Django3/doc/sourcecode/build/html/_modules/my_package1/my_module1.html#Point2D"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#my_package1.my_module1.Point2D" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code></p>
<p>Class to illustrate typing.TypedDict</p>
<p>(Special construct to add type hints to a dictionary. At runtime it is a plain dict)</p>
<p>See: <a class="reference external" href="https://adamj.eu/tech/2021/05/10/python-type-hints-how-to-use-typeddict/">https://adamj.eu/tech/2021/05/10/python-type-hints-how-to-use-typeddict/</a></p>
<p>Usage:</p>
<p>a: Point2D = {‘x’: 1, ‘y’: 2, ‘label’: ‘good’}  # OK</p>
<p>b: Point2D = {‘x’: 1, ‘y’: 2}                   # KO (missing label)</p>
<p>c: Point2D = {‘z’: 3, ‘label’: ‘bad’}           # KO (z not defined)</p>
<p>d: Point2D = {}                                 # KO (missing x, y, label)</p>
<p>Definition (other possibilities):</p>
<p>Point2D = TypedDict(‘Point2D’, x=int, y=int, label=str)</p>
<p>Point2D = TypedDict(‘Point2D’, {‘x’: int, ‘y’: int, ‘label’: str})</p>
<dl class="py attribute">
<dt class="sig sig-object py" id="my_package1.my_module1.Point2D.x">
<span class="sig-name descname"><span class="pre">x</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">int</span></em><a class="headerlink" href="#my_package1.my_module1.Point2D.x" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="my_package1.my_module1.Point2D.y">
<span class="sig-name descname"><span class="pre">y</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">int</span></em><a class="headerlink" href="#my_package1.my_module1.Point2D.y" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="my_package1.my_module1.Point2D.label">
<span class="sig-name descname"><span class="pre">label</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">str</span></em><a class="headerlink" href="#my_package1.my_module1.Point2D.label" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="my_package1.my_module1.get_point">
<span class="sig-name descname"><span class="pre">get_point</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="file:///Users/epallier/_PROJ/_W/GFT/SOFT/PROJ_PYROS/PYROS_DOCK_Django3/doc/sourcecode/build/html/_modules/my_package1/my_module1.html#get_point"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#my_package1.my_module1.get_point" title="Permalink to this definition"></a></dt>
<dd><dl class="field-list simple">
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p><a class="reference internal" href="#my_package1.my_module1.Point2D" title="my_package1.my_module1.Point2D"><code class="xref py py-class docutils literal notranslate"><span class="pre">Point2D</span></code></a></p>
</dd>
</dl>
</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="my_package1.my_module1.Position">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">Position</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">lon</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">lat</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0.0</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="file:///Users/epallier/_PROJ/_W/GFT/SOFT/PROJ_PYROS/PYROS_DOCK_Django3/doc/sourcecode/build/html/_modules/my_package1/my_module1.html#Position"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#my_package1.my_module1.Position" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>@dataclass</p>
<p>Class to illustrate Data Classes (@dataclass)</p>
<p>See: <a class="reference external" href="https://realpython.com/python-data-classes">https://realpython.com/python-data-classes</a></p>
<p>A DataClass is a shortcut to define a “data structure” without method</p>
<p>It is much like a NamedTuple, but “mutable”, and with more features.</p>
<p>Defines automatically a lot of things for you :</p>
<ul class="simple">
<li><p>__init__() (with self.x = x, self.y = y, …)</p></li>
<li><p>__repr()__</p></li>
<li><p>__eq()__</p></li>
<li><p>order, sort, immutable or not (frozen=True), …</p></li>
</ul>
<p>NB: on peut quand même ajouter des méthodes à une dataclass car c’est une classe normale…</p>
<p>Definition alternatives :</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">dataclasses</span> <span class="kn">import</span> <span class="n">make_dataclass</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Position</span> <span class="o">=</span> <span class="n">make_dataclass</span><span class="p">(</span><span class="s1">'Position'</span><span class="p">,</span> <span class="p">[</span><span class="s1">'name'</span><span class="p">,</span> <span class="s1">'lat'</span><span class="p">,</span> <span class="s1">'lon'</span><span class="p">])</span>
</pre></div>
</div>
<p>Usage:</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">pos</span> <span class="o">=</span> <span class="n">Position</span><span class="p">(</span><span class="s1">'Oslo'</span><span class="p">,</span> <span class="mf">10.8</span><span class="p">,</span> <span class="mf">59.9</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">pos</span>
<span class="go">Position(name='Oslo', lat=10.8, lon=59.9)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">pos</span><span class="o">.</span><span class="n">lon</span>
<span class="go">59.9</span>
</pre></div>
</div>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>name</strong> (<em>str</em>) – </p></li>
<li><p><strong>lon</strong> (<em>float</em>) – </p></li>
<li><p><strong>lat</strong> (<em>float</em>) – </p></li>
</ul>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p>None</p>
</dd>
</dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="my_package1.my_module1.Position.name">
<span class="sig-name descname"><span class="pre">name</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">str</span></em><a class="headerlink" href="#my_package1.my_module1.Position.name" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="my_package1.my_module1.Position.lon">
<span class="sig-name descname"><span class="pre">lon</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">float</span></em><a class="headerlink" href="#my_package1.my_module1.Position.lon" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="my_package1.my_module1.Position.lat">
<span class="sig-name descname"><span class="pre">lat</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">float</span></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">0.0</span></em><a class="headerlink" href="#my_package1.my_module1.Position.lat" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="my_package1.my_module1.PlayingCard">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">PlayingCard</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">rank</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">suit</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="file:///Users/epallier/_PROJ/_W/GFT/SOFT/PROJ_PYROS/PYROS_DOCK_Django3/doc/sourcecode/build/html/_modules/my_package1/my_module1.html#PlayingCard"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#my_package1.my_module1.PlayingCard" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>@dataclass</p>
<p>Class to illustrate Data Classes (@dataclass)</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>rank</strong> (<em>str</em>) – </p></li>
<li><p><strong>suit</strong> (<em>str</em>) – </p></li>
</ul>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p>None</p>
</dd>
</dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="my_package1.my_module1.PlayingCard.rank">
<span class="sig-name descname"><span class="pre">rank</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">str</span></em><a class="headerlink" href="#my_package1.my_module1.PlayingCard.rank" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="my_package1.my_module1.PlayingCard.suit">
<span class="sig-name descname"><span class="pre">suit</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">str</span></em><a class="headerlink" href="#my_package1.my_module1.PlayingCard.suit" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="my_package1.my_module1.Deck">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">Deck</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">cards</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="file:///Users/epallier/_PROJ/_W/GFT/SOFT/PROJ_PYROS/PYROS_DOCK_Django3/doc/sourcecode/build/html/_modules/my_package1/my_module1.html#Deck"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#my_package1.my_module1.Deck" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>@dataclass</p>
<p>Class to illustrate Data Classes (@dataclass)</p>
<p>Usage:</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">queen_of_hearts</span> <span class="o">=</span> <span class="n">PlayingCard</span><span class="p">(</span><span class="s1">'Q'</span><span class="p">,</span> <span class="s1">'Hearts'</span><span class="p">)</span>
</pre></div>
</div>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">ace_of_spades</span> <span class="o">=</span> <span class="n">PlayingCard</span><span class="p">(</span><span class="s1">'A'</span><span class="p">,</span> <span class="s1">'Spades'</span><span class="p">)</span>
</pre></div>
</div>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">two_cards</span> <span class="o">=</span> <span class="n">Deck</span><span class="p">([</span><span class="n">queen_of_hearts</span><span class="p">,</span> <span class="n">ace_of_spades</span><span class="p">])</span>
</pre></div>
</div>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>cards</strong> (<em>List</em><em>[</em><a class="reference internal" href="#my_package1.my_module1.PlayingCard" title="my_package1.my_module1.PlayingCard"><em>my_package1.my_module1.PlayingCard</em></a><em>]</em>) – </p>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p>None</p>
</dd>
</dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="my_package1.my_module1.Deck.cards">
<span class="sig-name descname"><span class="pre">cards</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">List</span><span class="p"><span class="pre">[</span></span><a class="reference internal" href="#my_package1.my_module1.PlayingCard" title="my_package1.my_module1.PlayingCard"><span class="pre">my_package1.my_module1.PlayingCard</span></a><span class="p"><span class="pre">]</span></span></em><a class="headerlink" href="#my_package1.my_module1.Deck.cards" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="py class">
<dt class="sig sig-object py" id="my_package1.my_module1.Cmd">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">Cmd</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">generic_name='generic</span> <span class="pre">name'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">native_name=''</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">desc='Description'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">params=&lt;factory&gt;</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">final_simul_response='simulator</span> <span class="pre">response'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">final_device_responses=&lt;factory&gt;</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">immediate_responses=&lt;factory&gt;</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">errors=&lt;factory&gt;</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="file:///Users/epallier/_PROJ/_W/GFT/SOFT/PROJ_PYROS/PYROS_DOCK_Django3/doc/sourcecode/build/html/_modules/my_package1/my_module1.html#Cmd"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#my_package1.my_module1.Cmd" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>@dataclass</p>
<p>PyROS example class to illustrate Data Classes
(@dataclass, and using ‘field’)</p>
<p>Usage:</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">c</span> <span class="o">=</span> <span class="n">Cmd</span><span class="p">(</span><span class="s1">'get_timezone'</span><span class="p">)</span>
</pre></div>
</div>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">c</span> <span class="o">=</span> <span class="n">Cmd</span><span class="p">(</span><span class="s1">'do_init'</span><span class="p">,</span><span class="s1">'do_init'</span><span class="p">),</span>
</pre></div>
</div>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>generic_name</strong> (<em>str</em>) – </p></li>
<li><p><strong>native_name</strong> (<em>str</em>) – </p></li>
<li><p><strong>desc</strong> (<em>str</em>) – </p></li>
<li><p><strong>params</strong> (<em>Dict</em><em>[</em><em>str</em><em>, </em><em>str</em><em>]</em>) – </p></li>
<li><p><strong>final_simul_response</strong> (<em>str</em>) – </p></li>
<li><p><strong>final_device_responses</strong> (<em>Dict</em><em>[</em><em>str</em><em>, </em><em>str</em><em>]</em>) – </p></li>
<li><p><strong>immediate_responses</strong> (<em>Dict</em><em>[</em><em>str</em><em>, </em><em>str</em><em>]</em>) – </p></li>
<li><p><strong>errors</strong> (<em>Dict</em><em>[</em><em>str</em><em>, </em><em>str</em><em>]</em>) – </p></li>
</ul>
</dd>
<dt class="field-even">Return type</dt>
<dd class="field-even"><p>None</p>
</dd>
</dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="my_package1.my_module1.Cmd.generic_name">
<span class="sig-name descname"><span class="pre">generic_name</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">str</span></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'generic</span> <span class="pre">name'</span></em><a class="headerlink" href="#my_package1.my_module1.Cmd.generic_name" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="my_package1.my_module1.Cmd.native_name">
<span class="sig-name descname"><span class="pre">native_name</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">str</span></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">''</span></em><a class="headerlink" href="#my_package1.my_module1.Cmd.native_name" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="my_package1.my_module1.Cmd.desc">
<span class="sig-name descname"><span class="pre">desc</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">str</span></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'Description'</span></em><a class="headerlink" href="#my_package1.my_module1.Cmd.desc" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="my_package1.my_module1.Cmd.params">
<span class="sig-name descname"><span class="pre">params</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">Dict</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">str</span><span class="p"><span class="pre">]</span></span></em><a class="headerlink" href="#my_package1.my_module1.Cmd.params" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="my_package1.my_module1.Cmd.final_simul_response">
<span class="sig-name descname"><span class="pre">final_simul_response</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">str</span></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'simulator</span> <span class="pre">response'</span></em><a class="headerlink" href="#my_package1.my_module1.Cmd.final_simul_response" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="my_package1.my_module1.Cmd.final_device_responses">
<span class="sig-name descname"><span class="pre">final_device_responses</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">Dict</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">str</span><span class="p"><span class="pre">]</span></span></em><a class="headerlink" href="#my_package1.my_module1.Cmd.final_device_responses" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="my_package1.my_module1.Cmd.immediate_responses">
<span class="sig-name descname"><span class="pre">immediate_responses</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">Dict</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">str</span><span class="p"><span class="pre">]</span></span></em><a class="headerlink" href="#my_package1.my_module1.Cmd.immediate_responses" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="my_package1.my_module1.Cmd.errors">
<span class="sig-name descname"><span class="pre">errors</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">Dict</span><span class="p"><span class="pre">[</span></span><span class="pre">str</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">str</span><span class="p"><span class="pre">]</span></span></em><a class="headerlink" href="#my_package1.my_module1.Cmd.errors" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="my_package1.my_module1.main">
<span class="sig-name descname"><span class="pre">main</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="file:///Users/epallier/_PROJ/_W/GFT/SOFT/PROJ_PYROS/PYROS_DOCK_Django3/doc/sourcecode/build/html/_modules/my_package1/my_module1.html#main"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#my_package1.my_module1.main" title="Permalink to this definition"></a></dt>
<dd><p>Comment on Main function definition</p>
<dl class="field-list simple">
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p><code class="xref py py-obj docutils literal notranslate"><span class="pre">None</span></code></p>
</dd>
</dl>
</dd></dl>

</section>


           </div>
          </div>
          <footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
        <a href="file:///Users/epallier/_PROJ/_W/GFT/SOFT/PROJ_PYROS/PYROS_DOCK_Django3/doc/sourcecode/build/html/my_package1.html" class="btn btn-neutral float-left" title="my_package1 package" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
    </div>

  <hr>

  <div role="contentinfo">
    <p>© Copyright 2022, E. Pallier, A. Klotz, A. Koralewski.</p>
  </div>

  Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
    <a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
    provided by <a href="https://readthedocs.org/">Read the Docs</a>.
   

</footer>
        </div>
      </div>
    </section>
  </div>
  <script>
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script> 


</body></html>