Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the specific method of Python syntax checking to reference PyLint configuration

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

What this article shares to you is about the specific method of Python grammar check citing PyLint configuration. The editor thinks it is very practical, so I share it with you. I hope you can get something after reading this article. Let's take a look at it.

Python, as a dynamic language, may have some related problems when building a large system. Python syntax checking will give a relevant solution to this problem.

Getting accustomed to compiling languages such as Python +, and using dynamic languages like CAccord, it is always a bit uneasy, especially when building a larger system. Tools for Python syntax checking have emerged. It can realize the object-oriented idea (encapsulation, multiplication, polymorphism). Because C++ is compatible with C in order to take care of a large number of C language users, it only becomes a C language with classes, which affects its object-oriented thoroughness more or less.

The word C is usually pronounced "C plus" among Chinese mainland programmers, while Western programmers usually pronounce it "C plus plus", which is a very widely used computer programming language. C++ is a general programming language that checks static data types and supports multiple programming paradigms. It supports a variety of programming styles, such as programming, data abstraction, object-oriented programming, generic programming and so on.

Dr. Benjani Strauss-Lupp (w:en:Bjarne Stroustrup) of C++ Bell Laboratories invented and implemented C++ in the 1980s (the language was originally called "C with Classes"). At first, C++ appeared as an enhanced version of the C language, adding new features to the C language starting with the addition of classes. Virtual functions (virtual function), operator overloading (operator overloading), multiple inheritance (multiple inheritance), templates (template), exceptions (exception), RTTI, and namespaces (name space) are gradually added to the standard.

In 1998, the International Standards Organization (ISO) promulgated the international standard ISO/IEC 14882-1998 for C++ programming language. Unfortunately, due to the complexity of the C++ language and the evolution over the years, up to now (2004) only a few compilers fully comply with this standard (this is not entirely true, in fact, no compiler fully supports ISO C++ so far).

The design goal of + + is to retain the advantages of c language, such as system programming features, fast execution, etc., plus object-oriented features.

Later, I inadvertently found that it seems that PyDev did not do its own syntax checking on Python, but also referenced PyLint, but there are a few points to pay attention to when configuring PyLint:

1. First install logilab-astng

2. To make these two packages work properly, you need to make some changes to logilab-common:

Proc.py line (115)

From signal import * # signal, SIGXCPU, SIGKILL

SIGUSR2, SIGUSR1

From os import * # killpg, getpid, setpgrp

From threading import Timer, currentThread

Thread, Event

From time import time

# from resource import getrlimit, setrlimit

RLIMIT_CPU, RLIMIT_AS

The specific effect has not been deeply realized in use, so you can try it yourself. Judging from the official website of pychecker, it seems to be OK, and pylint can also be seamlessly integrated with pydev.

The above is the specific method of Python syntax checking to reference PyLint configuration, and the editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report