On Nov 12, 2:46 pm, Laszlo Nagy <[EMAIL PROTECTED]> wrote:
> Gabriel Genellina wrote:
> > QOTW: "AOP is a programming paradigm in the same way indie is a genre of
> > film." - Carl Banks
> >http://groups.google.com/group/comp.lang.python/msg/224e922a3e1a8
ered comparisons, not for subset and superset testing.
Unfortunately, the rogue operators are already there and in use, so
the right solution would probably cause more trouble than it would
save at this point. But it'd still cause less trouble than
resurrecting the __cmp__ operator.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
ave something like this:
mypet.owner.get_attributes()
you should reverse-refactor it into something like this:
mypet.get_owner_attributes()
I would agree that the former is preferable, especially in cases like
this one where the classes aren't really closely related.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
s tricky, error prone, and
defeats the purpose of keeping seperate namespaces.
OTOH, if you find yourself delving several dots deep a lot, it
suggests that you need to refactor you code. Move some of the code
from the shallower classes into the deeper classes, closer to the data
it needs.
Hope this helped and didn't confuse you even more. :) Good luck
learning.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
to
be tacit support from the language for mimicking the proxied classes
in such ways.
I guess for me it would be a judgment call on based how tight I wanted
the proxy class to be--is it being the class, or is it just standing
in?
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
jay graves wrote:
> On Sep 21, 2:43 am, Tim Golden <[EMAIL PROTECTED]> wrote:
>> Carl K wrote:
>>> It seems there are 2 odbc modules - pyOdbc and mxOdbc - anyone know the
>>> difference?
>> In short, pyodbc is open source; mxOdbc requires a commercial licens
memoized( fib ) :
> print fib.__doc__
> for i in xrange( 36 ) :
>print "n=%d => %d" % (i, fib(i))
> print fib.__doc__
> print fib.__doc__
>
> outputs :
>
> biggus fibbus
> memoized version of function
spe or shoud i use my favorite
> > text editor!
>
> > i used IDLE on windows and it seamd nice. Now i have linux installed on
> > my mashine and boa works, spe wont start, IDLE crashes when compailinfg!
>
> > And if editor is bether choice witch one to use!
>
k the Python 3 effort has done well to keep things from
getting out of hand; I expect transitions to be mostly smooth.
Probably the trickiest aspect of transition will be getting Unicode
and byte strings straight.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
s.
> Even more amazing is the rate C++ is losing
> ground:http://www.tiobe.com/tiobe_index/C__.html
This might be the best of all.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
scripts that (paraphrasing the perl man page) require a bit more
complexity than sed or awk; these sorts of things don't really need
version control. Python is more geared to complex applications, so
version control comes into play a lot more. It's not a surprise that
Python would have more commits then, even back as far as 2000 when
Perl was the shizzle.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
) when
> the new behavior changes only slightly the existing subclass, perhaps
> a simple default option in the subclass's __init__ method would be
> best. Where is the tipping point?
Good question.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
On Dec 7, 9:36 am, Neil Cerutti <[EMAIL PROTECTED]> wrote:
> On 2007-12-07, Carl Banks <[EMAIL PROTECTED]> wrote:
>
> > On Dec 6, 11:56 am, "Kurt Smith" <[EMAIL PROTECTED]> wrote:
> >> It would seem that there are cases where one would be
> &g
one gets bound to a?
To do something similar in C would require preprocessor macros (ick).
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
class Key(object):
def __init__self):
self.__dict__['props'] = KeyProps()
def __getattr__(self,var):
return getattr(self.props,var)
def __setattr__(self,var,val):
setattr(self.props,var,val)
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
ate ten million integer objects dwarfs the time required to
allocate a single list with ten million entries, and this cost occurs
with both range and xrange, unless you break early.
> Given the amount of performance difference, I don't see why
> xrange even
> exists.
To keep memor
e OP was asked by a
misguided management to make sure it was "reverse-engineer-proof". So
any attempt to convince the OP may be aimed at the wrong person.
Misguided as they are, sometimes you have to placate these people.
So, are there any ways to make it "harder" to reverse engineer a
. If it's for
school you're probably covered, but in real world, it would be better
to:
1. Rewrite calculation to avoid arccos and arcsin (using trigonometric
or geometric identities)
2. Clamp it to range [-1.0:1.0]. You can do this in numpy with
numpy.clip().
Carl Banks
--
http://m
def set_state():
return my_machine.get_state()
Some users won't want the simplified interface. Really.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
en both be
> supplied by the contained objects.
And yet, by the same reasoning, using > and <= for list and tuple is
also a "bad idea".
> If a LarchTree user stores objects that don't support __gt__,
> will he have a legitimate complaint when using LarchTree.__le__
tly more self-documenting. And
if you had been using super(), you could have avoided repeating the
symbol Foo. But 2 is more efficient and less typing than 3.
Option 4 is abhorrent.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
On Dec 15, 9:05 am, [EMAIL PROTECTED] wrote:
> On Dec 15, 8:33 am, Carl Banks <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Dec 14, 4:15 pm, Neil Cerutti <[EMAIL PROTECTED]> wrote:
>
> > > When implementing the rich comparison operators for some sort of
>
plication to depend on their library?
Sometimes you have to work with code that's not up to your standards,
but come on.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
ng old and new style
> classes.
>
> Monkey patching is definitely unpythonic. You must be a Ruby guy. Why
> don't you try doing something else to get the behavior you want,
> something more explicit?
Time and place.
A well-considered, timely monkey-patch can sometimes save all kinds of
workarounds and other headaches.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
p anyone.
The OP wanted to minimize memory usage, exactly the intended usage of
slots. Without knowing more about the OP's situation, I don't think
your or I or Chris Mellon can be sure it's not right for the OP's
situation.
You're obviously smart and highly expert i
On Dec 19, 10:55 am, George Sakkis <[EMAIL PROTECTED]> wrote:
> On Dec 18, 3:16 pm, Carl Banks <[EMAIL PROTECTED]> wrote:
>
> > On Dec 18, 10:08 am, "[EMAIL PROTECTED]"
>
> > <[EMAIL PROTECTED]> wrote:
> > > We are trying to monkey-patc
dict):
for key,value in clsdict.iteritems():
if isinstance(value,type):
clsdict[key] = type(value.__name__,(value,),{})
type.__new__(cls,name,bases,clsdict)
class A(object):
__metaclasS__ = AutoSubclassMetaclass
class C(object):
foobar = 40
class B(A):
pass
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
How do I hang an app off the mac dashboard?
The goal is a python version of Weatherbug.
something like:
read xml data from a URL,
display some numbers,
mouse over shows more details
Carl K
--
http://mail.python.org/mailman/listinfo/python-list
ianaré wrote:
> On Dec 21, 12:37 pm, Carl K <[EMAIL PROTECTED]> wrote:
>> How do I hang an app off the mac dashboard?
>>
>> The goal is a python version of Weatherbug.
>>
>> something like:
>> read xml data from a URL,
>> display some num
Chris Mellon wrote:
> On Dec 21, 2007 3:25 PM, Carl K <[EMAIL PROTECTED]> wrote:
>> ianaré wrote:
>>> On Dec 21, 12:37 pm, Carl K <[EMAIL PROTECTED]> wrote:
>>>> How do I hang an app off the mac dashboard?
>>>>
>>>> The goal is a
I need to take the take the pdf output from reportlab and create a preview
image
for a web page. so png or something. I am sure ghostscript will be involved.
I am guessing PIL or ImageMagic ?
all sugestions welcome.
Carl K
--
http://mail.python.org/mailman/listinfo/python-list
Jaap Spies wrote:
> Carl K wrote:
>> I need to take the take the pdf output from reportlab and create a
>> preview image for a web page. so png or something. I am sure
>> ghostscript will be involved. I am guessing PIL or ImageMagic ?
>>
>> all sugestions welco
Grant Edwards wrote:
> On 2007-12-24, Carl K <[EMAIL PROTECTED]> wrote:
>
>>> If it is a multi page pdf Imagemagick will do:
>>>
>>> convert file.pdf page-%03d.png
>> I need python code to do this. It is going to be run on a
>> someone else
Andrew MacIntyre wrote:
> Grant Edwards wrote:
>> On 2007-12-24, Carl K <[EMAIL PROTECTED]> wrote:
>>
>>>> If it is a multi page pdf Imagemagick will do:
>>>>
>>>> convert file.pdf page-%03d.png
>>> I need python code to do th
Jaap Spies wrote:
> Carl K wrote:
>> Grant Edwards wrote:
>>> On 2007-12-24, Carl K <[EMAIL PROTECTED]> wrote:
>>>
>>>>> If it is a multi page pdf Imagemagick will do:
>>>>>
>>>>> convert file.pdf page-%03d.png
>&
Diez B. Roggisch wrote:
> Carl K schrieb:
>> Grant Edwards wrote:
>>> On 2007-12-24, Carl K <[EMAIL PROTECTED]> wrote:
>>>
>>>>> If it is a multi page pdf Imagemagick will do:
>>>>>
>>>>> convert file.pdf page-%03d.pn
Rob Wolfe wrote:
> Carl K <[EMAIL PROTECTED]> writes:
>
>> I need to take the take the pdf output from reportlab and create a
>> preview image for a web page. so png or something. I am sure
>> ghostscript will be involved. I am guessing PIL or ImageMagic ?
>>
Grant Edwards wrote:
> On 2007-12-25, Diez B. Roggisch <[EMAIL PROTECTED]> wrote:
>> Carl K schrieb:
>>> Grant Edwards wrote:
>>>> On 2007-12-24, Carl K <[EMAIL PROTECTED]> wrote:
>>>>
>>>>>> If it is a multi page pdf Imagem
h to justify a new statement. Metaclasses aren't too
common, and are generally used by experts who don't need the
straightforwardness the make statement would provide.
But, properties, dicts, and other things could benefit from some of the
semantics the class statement, and with the make statem
Tim Hochberg wrote:
> Carl Banks wrote:
> > Mike Orr wrote:
> >
> >>>I think this PEP is going off the rails. It's primary virtue was that it
> >>
> >>was a simpler, clearer way to write:
> >>
> >> class Foo(args):
> &g
same exception; might have
to disambiguate them somehow in the except block.
Language-wise, I doubt there are any serious gotchas whem running
regular (as opposed to error handling) code in an except block. So go
right ahead; no need to feel guilty about it.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
es be mature enough that writing interface definitions
would be useful and not a burden. (And let's face it: there aren't
many projects that get that far. :)
Adaptation I have no comment about, not having needed it (yet).
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
e not - or hardly - existed in programming
> before python?
Nesting by indentation
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
Cameron Laird wrote:
> In article <[EMAIL PROTECTED]>,
> Carl Banks <[EMAIL PROTECTED]> wrote:
> >Wildemar Wildenburger wrote:
> >> Are there any concepts that python has not borrowed, concepts that were
> >> not even inspired by other languages? I'
[EMAIL PROTECTED] wrote:
> Heiko Wundram wrote:
> > Because sometimes you don't want to call the base classes constructors?
> Sounds strange to me at the moment, but I'll try to adjust to this
> thought.
In Java and C++, classes have private members that can only be accessed
by the class itself (a
that I'd say that Python __init__ is analogous to Java and
C++ constructors, but is not a constructor because C++ and Java
constructors are not constructors. :) And Java has pointers, not
references. :)
A-rose-by-any-other-name-ly yr's,
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
Duncan Booth wrote:
> In other words, the object is constructed in Python before any __init__ is
> called, but in C++ it isn't constructed until after all the base class
> constructors have returned.
That's true. Good point.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
t yet been
> set up.
In Python, if you try to use an uninitialized member you get an
AttributeError; I really don't see too much inherent danger here. If
you make a mistake, the language tells you and you fix it. C++ and
Java are worse since accessing uninitialized variables is a silen
ine if can't be
> followed by an else.
Thus proving the original claim about it being confusing. :) I think
he intended it to parse this way:
if ($x) { $y++ if $z; } else { $z--; }
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
Lawrence D'Oliveiro wrote:
> In article <[EMAIL PROTECTED]>,
> "Carl Banks" <[EMAIL PROTECTED]> wrote:
>
> >bruno at modulix wrote:
> >> [EMAIL PROTECTED] wrote:
> >> > I was wondering, why you always have to remember to call bas
It would
accept a filename rather than a file descriptor, anonymous blocks would
be handled OS-independently, rather than mapping /dev/zero, and so on.)
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
q = 0
>>> r = 0
>>> s = 0
>>> id(q)
134536636
>>> id(r)
134536636
>>> id(s)
134536636
[snip]
> My rule, don't do it unless you know exactly why you
> want to do it. It will trip you up at some point and
> be VERY hard to find.
It's ok to do it with constant objects, really.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
e? If yes, then use ==. 0 == 0 should be true even if the two
zeros are different objects.
Corrollary:
You should test for singleton objects with is. None, NotImplemented,
and Ellipsis are singleton objects; this is part of the language and
not an implementation detail. You can rely on
ultiple times in the same statement.
Try showing what they look like nested. The "readable" example would
turn into ASCII vomit.
Probably the day it makes it into Python is the day Python jumps the
shark.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
gle-file
executables. PyInstaller works on Unix too, IIRC.
If you're good at tweaking stuff and have some knowledge of Python
internals; it's possible to make a minimal distro just by copying files
out of a regular installation by hand (and maybe zipping some them up).
This can be a
G. Monzón wrote:
> Please don't compare PHP with Python... They are very different worlds.
I'm not. I was simply agreeing that the single executable way the OP
claimed PHP does it can *sometimes* be preferrable in Python, and
giving him recommendations thereto.
Carl Ba
n func(*args,**kwd)
> return iterfunc
CONTINUE could be put inside tail_recursive, couldn't it? And to
squeeze a little more speed out of it, var could be a list (saves a
hash lookup).
Cool decorator.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
ction for SGI IRIX modules, and IRIX support
is scheduled to be dropped in Python 3000. There might be a good
reason why win32 isn't in Python base distro, but that it's
Windows-only isn't it.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
shared library
(if the license allows it, of course), or rebuild the qt.so with the
static QT libraries.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
u're doing this on Linux, it's not all that unreasonable
to require QT to be installed on the target system. Any reasonable
distribution has it nicely packaged.
But, if you must, "ldd qt.so" will list library dependencies of qt.so.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
gt; Position the CWD in the desired base directory of
> the archive,
> add the files to the archive using their relative pathnames, and put
> the CWD back
> where it was when you started:
This may be the best way anyways, unless you have some reason to not
change the current directory.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
modifier (like Ada's "in and out") instead?
Problem with that is then positional arguments line up wrong. Ick.
def func(a : int = 1): pass
def func(a : kwonly int = 1): pass
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
alling it and catch CallableError (or whatever it is). Of
course, that error can be raised inside the function; and in this case,
there's no way to isolate only the part you you're checking for an
exception.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
hecking is appropriate to it -- and if needed, raise
> some custom "command failure" exception after handling the real failure
> internally.
That probably doesn't help when the exception is due to a bug and not
bad input. If you have an AttributeError due to a bug, it w
. So queuing instead of Queue.
Unfortunately, the Python library isn't setting a good example here.
Too much glob.glob, time.time, socket.socket, and Queue.Queue. I hope
all these go away in Python 3000.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
tianly negative) pronouncement, so we have it on the record.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
in y:
if x is not None:
_.append(x)
In other words, each for and if in a listcomp is equivalent to a nested
block in a regular statement. There's a regular way to nest, and
listcomp way, and they're separate. This PEP suggests we should mix
them up--now *that'
PROTECTED]:~$ cat /etc/hosts
127.0.0.1 localhost
127.0.0.1 asus17.personnelware.comasus17
127.0.0.1 newsgroups.comcast.net
Carl K
--
http://mail.python.org/mailman/listinfo/python-list
I am trying to convert the pdf to a png, but without having to run external
commands. so I will understand if you arn't happy with pdfimages.
Carl K
--
http://mail.python.org/mailman/listinfo/python-list
nnoys quite a few people. When you reply to a
message, please move your cursor to below the quoted message before
you begin typing. Thank you
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
ne or two about the set objects. (It's
probably at least better than listing internal objects.)
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
pre-processing goes: the pdf is generated from data the user just
entered into a web page. it may not even be saved to the DB yet.
the new ImageMagick bindings should do what I need:
http://www.procoders.net/?p=39
Carl K
--
http://mail.python.org/mailman/listinfo/python-list
which seems to be
what you need.
In IDLE, you'll have to capture the output of the programs and print
it yourself, since you can't (AFAIK) run a DOS shell in an IDLE
window. Untested:
import subprocess
output = subprocess.Popen('MD "' + new_folder + '"', shell=True,
stdout=subprocess.PIPE, stderr=subprocess.STDOUT).communicate()[0]
print output
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
:
for i in xrange(len(x)-1):
j = random.randrange(i+1,len(x))
tmp = x[j]
if test_property_func(tmp):
return tmp
x[j] = x[i]
x[i] = tmp
return None
Then, for example, use it like this:
def odd(i): return i&1
e = random_element_with_proper
hildren to be an instance attribute rather than a class
attribute, so I redid it that way, but .)
P.S. Is calling a method called "firing" in C#?
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
en than a
benefit, especially in code that is young and still subject to lots of
redesign and refactoring.
And ehen interfaces do make sense, such as in a plugin system or a
complex framework, the user should be free to ignore the interface at his
own risk.
Carl Banks
--
http://mail.python.or
7;ve done enough to choose.
"it doesn't suck".
(Really. All programming languages have good, useful features. Even
Perl. Python is unique in having no very bad ones.)
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
quot;its pythonicity".
Mixing Greek and Latin suffixes usually works better than mixing Greek
and Germanic, doesn't it.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
intrc file (location may vary on Windows) and there was a
declaration in the file that listed symbols to ignore.
Last time I bothered running it, I added "id" to that list, since I use
it often (bad habit) and almost never use the builtin id, but still
wanted shadowing warnings for othe
the event loop, same as most GUIs do. Plus it's
not straightforward to integrate the SDL window into the widget systems.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
repeat" as the keyword.)
1. Looping a fixed number of times is quite uncommon.
2. A syntax for it buys you almost nothing.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
Obj(*args)
self.tracked_objs.add(obj)
return obj
def run(self):
for obj in self.tracked_objs:
# do something with obj
bigobj = Bigobj()
obj1 = bigobj.create_object(params1)
obj2 = bigobj.create_object(params2)
# maybe do something with obj1 and obj2 here
bigobj.run()
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
I recommend putting *.py files there as
well, so users can refer to it if there are any problems, but you don't
have to. The Python module compileall is your friend here.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
hatever to their path path and
use it that way.
I realize it's a fine line and a judgment call in some cases, but site-
packages is really for libraries; applications should use their own
directories.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
ighted that str.rstrip()
> removed the trailing-padding-for-nicer-layout no-break spaces that the
> users had copy/pasted from some clown's website :-)
>
> What was the *real* cause of your irritation?
If you want to use str.split() to split words, you will foil the user who
wants to not break at a certain point.
Your use of rstrip() is a lot more specialized, if you ask me.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
recursion.
Or, perhaps something more subtle than infinite recursion, such as
hard-to-comprehend rules about what modules and subpackages would be
imported. So they just decided to disallow it. Just a guess.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
? Is there a best practices guide for module
> naming?
Not really. Try to pick a unique name for your project. <:\
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
dia
article, which led me to the topsort algorithm. I did a dance of joy.
Ten minutes later I saw it mentioned it on comp.lang.python.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
ng "univeral newlines" in a non-text format seems like it's not a
good idea.
For text-format pickles it'd be the right thing, of course.
> Incidentally, in the subprocess, it's useful to do
>
> sys.stdout = sys.stderr
>
> after setting up the Pick
quot;
> % id(w.should_keep_running))
>
> if __name__ == "__main__":
> main()
It looks like your program's hanging while the waiter is waits to
acquire another plate of hot food.
Quick and dirty solution is to have waiter timeout at intervals while
waiting for the chef and check the clock to see if his shift has
ended. Better solution is to rewrite the logic, which you did.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
f itself).
You can reassign the class's module:
from org.lib.animal.monkey import Monkey
Monkey.__module__ = 'org.lib.animal'
(Which, I must admit, is not a bad idea in some cases.)
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
On Jan 24, 10:14 am, Bjoern Schliessmann wrote:
> Tim Roberts wrote:
> > Grant is quite correct; Python scripts (in the canonical CPython)
> > are NOT compiled into assembly language. Scripts are compiled to
> > an intermediate language. Processors execute Python scripts when
> > the interpreter
t least for
classes, without softening the one-to-one module-to-file relationship,
or using "hacks".
In fact, I'd say this is good practice.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
s
when it's not there.
Make sense? Details can vary, but that's the basic idea. In this
way, you can combine some of the openness that helps in early
development, but also have some of the benefits of stricter typing
when things mature and turn out to be pretty strictly useful, withou
On Jan 26, 12:32 am, Paul Rubin <http://[EMAIL PROTECTED]> wrote:
> Carl Banks <[EMAIL PROTECTED]> writes:
> > AirplaneInterface = InterfaceTracker("Airplane")
> > ...
> > set_up_initial_state()
> > ...
> > Airplane
appropriate for that particular use.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
ISTM you came here looking for a particular means and not a
particular end. Python already has the power to meet your stated
needs, but you won't use that solution because it's "hacky".
Apparently all you really wanted was the loosened file structure in
the first place.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
quot;unintended consequences", by a
very large margin. Python has always been one-to-one module-to-file
(excepting modules built into the interpretter), and many codes and
tools have come to depend on it.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
effect other than by writing separate, independent
> manpages?
Not a big expert on docstrings (they seem so superfluous...) but
perhaps there are third-party packages that let you specify meta-
documentation with function decorators. For example:
@overview("Blah blah blah")
@authors("So and so")
def some_function():
pass
Try looking on PyPI (cheeseshop.python.org). Python's in-code
documentation is pretty basic; I think Python is happy to outsource
more elaborate schemes to third party packages.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
on,
to get a random index in a range.
Perhaps even better still, use random.choice. It gets a random
element in a sequence.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
601 - 700 of 2081 matches
Mail list logo