S
S
Sadig Sadigov2019-03-08 10:29:37
Python
Sadig Sadigov, 2019-03-08 10:29:37

Why doesn't redis want to "pull the value"?

That is, if we change the word set (let's say to seet), then it gives an error that there is no such attribute, but if we change get (let's say to geyt), then it does not give an error. That is, he roughly speaking does not read this line

import redis 
  

# задаем параметры базы redis: находится на localhost, стандартный порт 6397, номер базы 1 (по дефолту создается сразу 16: от 0 до 15)
r = redis.StrictRedis(host='localhost', port=6646, db=1)

#присваиваем переменной test1 значение 5
r.set('test1',5)

#получаем из переменной test1 значение
x = r.get('test1')

print(x)

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question