From 3dc50529ca1192c59050e63ef3b432630d993a65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Schoentgen?= Date: Tue, 8 Jan 2019 09:58:47 +0100 Subject: [PATCH] Fix DeprecationWarning: invalid escape sequence (#679) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mickaƫl Schoentgen --- ciphers/affine_cipher.py | 2 +- ciphers/rsa_cipher.py | 2 +- data_structures/binary tree/AVLtree.py | 4 ++-- data_structures/binary tree/binary_search_tree.py | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ciphers/affine_cipher.py b/ciphers/affine_cipher.py index 4fbe87d42..af5f4e0ff 100644 --- a/ciphers/affine_cipher.py +++ b/ciphers/affine_cipher.py @@ -1,7 +1,7 @@ from __future__ import print_function import sys, random, cryptomath_module as cryptoMath -SYMBOLS = """ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~""" +SYMBOLS = r""" !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~""" def main(): message = input('Enter message: ') diff --git a/ciphers/rsa_cipher.py b/ciphers/rsa_cipher.py index 94f69ddc2..3f8fb96e1 100644 --- a/ciphers/rsa_cipher.py +++ b/ciphers/rsa_cipher.py @@ -6,7 +6,7 @@ BYTE_SIZE = 256 def main(): filename = 'encrypted_file.txt' - response = input('Encrypte\Decrypt [e\d]: ') + response = input(r'Encrypte\Decrypt [e\d]: ') if response.lower().startswith('e'): mode = 'encrypt' diff --git a/data_structures/binary tree/AVLtree.py b/data_structures/binary tree/AVLtree.py index cb27004b6..ff44963d1 100644 --- a/data_structures/binary tree/AVLtree.py +++ b/data_structures/binary tree/AVLtree.py @@ -65,7 +65,7 @@ def my_max(a,b): def leftrotation(node): - ''' + r''' A B / \ / \ B C Bl A @@ -101,7 +101,7 @@ def rightrotation(node): return ret def rlrotation(node): - ''' + r''' A A Br / \ / \ / \ B C RR Br C LR B A diff --git a/data_structures/binary tree/binary_search_tree.py b/data_structures/binary tree/binary_search_tree.py index b4021e4f8..cef5b55f2 100644 --- a/data_structures/binary tree/binary_search_tree.py +++ b/data_structures/binary tree/binary_search_tree.py @@ -195,7 +195,7 @@ def InPreOrder(curr_node): return nodeList def testBinarySearchTree(): - ''' + r''' Example 8 / \ @@ -206,7 +206,7 @@ def testBinarySearchTree(): 4 7 13 ''' - ''' + r''' Example After Deletion 7 / \