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 fc9f1e64 authored by Stefan Marr's avatar Stefan Marr
Browse files

Backport minor style adaptations in block.py

Signed-off-by: default avatarStefan Marr <git@stefan-marr.de>
parent 5865b2c0
......@@ -22,13 +22,16 @@ class Block(AbstractObject):
return universe.blockClasses[self._method.get_number_of_arguments()]
class Evaluation(Primitive):
_immutable_fields_ = ['_number_of_arguments']
def __init__(self, num_args, universe, invoke):
Primitive.__init__(self, self._compute_signature_string(num_args),
universe, invoke)
self._number_of_arguments = num_args
def _compute_signature_string(self, num_args):
def _compute_signature_string(num_args):
# Compute the signature string
signature_string = "value"
if num_args > 1:
......@@ -40,9 +43,11 @@ class Block(AbstractObject):
# Return the signature string
return signature_string
def block_evaluation_primitive(num_args, universe):
return Block.Evaluation(num_args, universe, _invoke)
def block_evaluate(block, interpreter, frame):
context = block.get_context()
method = block.get_method()
......@@ -52,7 +57,7 @@ def block_evaluate(block, interpreter, frame):
result = interpreter.interpret(method, new_frame)
frame.pop_old_arguments_and_push_result(method, result)
def _invoke(ivkbl, frame, interpreter):
assert isinstance(ivkbl, Block.Evaluation)
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