filmov
tv
DON'T USE THE eval() FUNCTION IN PYTHON!
Показать описание
In this video I try to explain why you shouldn't use eval() function in your python code with the help of a practical real world example, which is just a simple test flask server.
eval is a built-in- function used in python, eval function parses the expression argument and evaluates it as a python expression. In simple words, the eval function evaluates the “String” like a python expression and returns the result as an integer.
This is in fact a dangerously incomplete answer. The real answer is that it executes python statements which you pass in and returns the answer back to you. To convert a string number into integer, the safest way you can take is by using the int() function to safeguard your projects.
I hope that this video can help raise awareness to such minute security details that often times developers miss. I will try my best to make more content and increase it's quality with time.
You can find the blog form of this video here: [insert medium link once the article is done]
Feel free to follow me on my socials:
I am also thinking of making a Python for beginners course soon enough. There are enough of Python tutorials you will find online on youtube but I want to make something that potentially gives something more to the students like Python Projects to work on, Python code assignments etc along with the Python Basics in the coding tutorial.
I am also planning on releasing a cybersecurity for beginners video series that aims at explaining the niche spectrums of cybersecurity that I have picked up on in the past two years even though I am a huge noob.
eval is a built-in- function used in python, eval function parses the expression argument and evaluates it as a python expression. In simple words, the eval function evaluates the “String” like a python expression and returns the result as an integer.
This is in fact a dangerously incomplete answer. The real answer is that it executes python statements which you pass in and returns the answer back to you. To convert a string number into integer, the safest way you can take is by using the int() function to safeguard your projects.
I hope that this video can help raise awareness to such minute security details that often times developers miss. I will try my best to make more content and increase it's quality with time.
You can find the blog form of this video here: [insert medium link once the article is done]
Feel free to follow me on my socials:
I am also thinking of making a Python for beginners course soon enough. There are enough of Python tutorials you will find online on youtube but I want to make something that potentially gives something more to the students like Python Projects to work on, Python code assignments etc along with the Python Basics in the coding tutorial.
I am also planning on releasing a cybersecurity for beginners video series that aims at explaining the niche spectrums of cybersecurity that I have picked up on in the past two years even though I am a huge noob.
Комментарии