473,395 Members | 1,571 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Codetags (also Pylint/Pychecker + Variable declarations)

* Codetag PEP:

** I would like to comment on the codetags PEP, which I give a 0+.
I think the end "<>" is bad; I would be in favor of a block system or
something that looks more like regular Python (e.g. "#
:FIXME(line_count=10, date='2005-08-09', ...) ").

** As to the comments that say "Trac does the same functionality"
or "Eclipse/Eric/Emacs... has the same functionality" I think codetags
are orthogonal to that. Also, some of us still use the old vi to edit
a system script in an emergency, and relying on bloated silliness like
Eclipse for documenting code seems, well, against all that is good and
true.

* Pylint:

** I also agree that a lint system is the place to enforce or
otherwise use things like codetags. A useful implementation would go a
long way to creating a standard organically.

* Variable declarations--a synthesis of codetags and lint:

** Perhaps a codetag system is the place to put variable
declarations, type checking, and the like. The lint system could grab
these and evaluate the code with them without messing with the compiler
or quick and dirty code styles. (Inferring properties of code from
static listings is for geniuses--not for me--so forgive any unrealistic
examples below). As an added benefit, there wouldn't be any
non-explicit checking to impede performance (but if you want, you can
always add assert's to your heart's content when it really matters,
which is rarely).

** Example

<pre>
str_var = '' # :DECLARE(type='string')
flt_var = 0 # :DECLARE(type='float')
line_index = 0 # :DECLARE(type='int', min=0, max=10)
for line_index in range(-10, 10) # "maximum exceeded" warning
mispelled_flt_var = 1ine_index / 2.5 # "undeclared variable"
warning
str_var = var + 1 # "type mismatch" warning
</pre>

Thanks for everyone's patience in reading this--I hope it helps further
the Pythonic cause of graceful programming.

Oct 8 '05 #1
0 1211

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Neal Norwitz | last post by:
A new version of PyChecker is (finally) available for your hacking pleasure. It's been quite a while since the last release--11 months. I wish there was more progress, but such is life. Many bug...
10
by: Kylotan | last post by:
Is there a practical way to use Pychecker in Windows? It doesn't work under IDLE. (In fact, it seems to end up breaking everything, and every subsequent statement and expression I execute gets...
4
by: beliavsky | last post by:
If I run PyChecker on the following program, stored in xtry.py, m = 10000000 k = 0 for i in xrange(m): k = k + i print k x = range(3) print x
21
by: Philippe Fremy | last post by:
Hi, I would like to develop a tool that goes one step further than pychecker to ensure python program validity. The idea would be to get close to what people get on ocaml: a static verification...
8
by: Micah Elliott | last post by:
I also have this living as a wiki <http://tracos.org/codetag/wiki/Pep> if people would like to add comments there. I might try to capture there feedback from this group anyway. First try at a PEP...
20
by: Micah Elliott | last post by:
Please read/comment/vote. This circulated as a pre-PEP proposal submitted to c.l.py on August 10, but has changed quite a bit since then. I'm reposting this since it is now "Open (under...
5
by: Tuomas | last post by:
#!/usr/bin/python """test pydev_0.9.3/../pylint""" __revision__ = "test_mod 0.1 by TV 06/10/22" lst = lst = map(lambda x: x.strip(), lst) result = """ No config file found, using default...
7
by: montyphyton | last post by:
Some recent posts about Python programming style got me thinking. Since we have the PEP 8 which gives some guidelines about the style to be used, do we have any program that can check for...
0
by: KLEIN Stephane | last post by:
Hi, I wonder if pychecker projet is dead ? On pychecker home page (http://pychecker.sourceforge.net/), last version date from February 3, 2006 and their mailist contain spam messages only. ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.