File: pak.py

package info (click to toggle)
pd-py 0.2.0%2Bgit20161103.1.d0e0648f-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 612 kB
  • ctags: 538
  • sloc: cpp: 4,617; python: 316; makefile: 11
file content (14 lines) | stat: -rw-r--r-- 350 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import pyext

class pak(pyext._class):
    def __init__(self,n):
        # n should be type-checked
        self._inlets = n
        self._outlets = 1
        # initialize list
        self.lst = [0 for x in range(n)]

    def _anything_(self,n,arg):
        # arg should be type-checked!
        self.lst[n-1] = arg
        self._outlet(1,self.lst)