From anonymous, 9 Months ago, written in Python.
This paste is a reply to Untitled from anonymous
- view diff
Embed
  1. from typing import TypeVar, Sequence
  2.  
  3. _T = TypeVar('_T')
  4.  
  5.  
  6. class NeighborList:
  7.  
  8.     def __init__(self, items: Sequence[_T]) -> None:
  9.         self._items = items
  10.  
  11.     @property
  12.     def items(self) -> Sequence[_T]:
  13.         return self._items
  14.  
  15. def fun() -> None:
  16.     nl = NeighborList([1, 2, 3])
  17.     print(nl.items[0] - 1)
  18.  
  19. fun()
  20.