程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

How to deal with illegal user input in Python or software HMI

編輯:Python

List of articles

  • 1 Introduction
  • 2 User input illegal hazards
    • 2.1 Cause program interruption
    • 2.2 Hidden bug Bring project risks
      • 2.2.1 King of glory bug
      • 2.2.2 Project practice summary
  • 3 How to deal with illegal user input
    • 3.1 Exception capture mechanism
    • 3.2 Monitor according to the usage scenario and the type of input data
    • 3.3 Set up the correct input list for query

1 Introduction

I saw a question in today's blog comment : How to deal with the problem that users input non numbers ?

In fact, this user seems to be just asking about the processing of non numeric strings , In fact, it inadvertently puts forward a kind of common problems in software interaction design , That is, how to deal with the problem of illegal user input .

My position on this issue is as follows : This problem ( Illegal user input ) It is not an individual situational problem of a language , It's engineering or HMI A kind of problems that need to be paid attention to in design .

For the problem at that time &#x


  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved