From 86583670afe19c1f8b74f8b42716f9a51cadc829 Mon Sep 17 00:00:00 2001 From: Emmanuel Fleury Date: Tue, 27 Aug 2024 15:18:05 +0200 Subject: [PATCH] Fix a deprecation warning in SimpleEval._eval_num() I have stumbled in the following deprecation warning when executing the code: rolldice/rolldice.py:175: DeprecationWarning: Attribute n is deprecated and will be removed in Python 3.14; use value instead return node.n The Fix just rename `node.n` to `node.value`. --- rolldice/rolldice.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rolldice/rolldice.py b/rolldice/rolldice.py index 95f7a7f..bca4983 100644 --- a/rolldice/rolldice.py +++ b/rolldice/rolldice.py @@ -180,9 +180,9 @@ def _eval_num(self, node): :return: Result of node """ if self.floats: - return node.n + return node.value else: - return int(node.n) + return int(node.value) def _eval_unaryop(self, node): """