[Twisted-Python] Getting Stories Straight (RPYs)
Glyph Lefkowitz
glyph at twistedmatrix.com
Tue Jun 24 00:41:05 MDT 2003
On Tuesday, June 24, 2003, at 01:13 AM, Moshe Zadka wrote:
> using them incorrectly leads to horribly unmaintainable applications.
> The
> best way to insure using them correctly is to not use them at all,
> until
> you are on your *final* deployment stages. By then, the whole "An RPY
> must
> be less than 10 lines" will be superfluous because you will not *have*
> more than 10 lines to write.
This is a great description of RPYs.
In fact, I propose that we put a hack into ResourceScript which stats
the .rpy file after it's been run, and if it is more than 512 bytes,
print a UserWarning like:
Woah there, code cowboy! It's likely you've misunderstood what RPYs
are for. Have you read this?
http://www.twistedmatrix.com/pipermail/twisted-python/2003-June/
004693.html
If you are quite sure that you are not committing an awful hack that
will bring doom to you and shame to your family, set
__no_seriously_this_rpy_needs_to_be_this_long__ = 5192
where 5192 is a new maximum size based on the current length of that
file, calculated for the user's convenience to include some extra
padding for the new attribute.
More information about the Twisted-Python
mailing list