WARNING! Access to this system is limited to authorised users only.
Unauthorised users may be subject to prosecution.
Unauthorised access to this system is a criminal offence under Australian law (Federal Crimes Act 1914 Part VIA)
It is a criminal offence to:
(1) Obtain access to data without authority. -Penalty 2 years imprisonment.
(2) Damage, delete, alter or insert data without authority. -Penalty 10 years imprisonment.
User activity is monitored and recorded. Anyone using this system expressly consents to such monitoring and recording.

To protect your data, the CISO officer has suggested users to enable 2FA as soon as possible.
Currently 2.7% of users enabled 2FA.

Commit c58e578c authored by Tobias Pape's avatar Tobias Pape Committed by Stefan Marr
Browse files

add some type assertions

parent 920240b8
......@@ -382,6 +382,7 @@ class Universe(object):
def new_integer(self, value):
assert isinstance(value, int)
# Allocate a new integer and set its class to be the integer class
result = Integer(self.nilObject)
......@@ -10,6 +10,7 @@ class Integer(Object):
return self._embedded_integer
def set_embedded_integer(self, value):
assert isinstance(value, int)
self._embedded_integer = value
def get_embedded_value(self):
......@@ -39,10 +39,13 @@ class Object(object):
def get_field(self, index):
# Get the field with the given index
assert isinstance(index, int)
return self._fields[index]
def set_field(self, index, value):
# Set the field with the given index to the given value
assert isinstance(index, int)
assert isinstance(value, Object)
self._fields[index] = value
def send(self, selector_string, arguments, universe, interpreter):
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment