Jeffrey Schwab wrote:
> Max wrote:
> > I was just thinking perhaps we should create some kind of collection of
> > bits of "impressive" code like this.
>
> Do you mean something like the ASPN Cookbooks?
>
> http://aspn.activestate.com/ASPN/Cookbook/
>
repositories, indexes and search engine
Max wrote:
> I have a friend who has been programming in C for many years, and he is
> a great fan of the language. However, he (and I) are about to start a
> python course, and he has been asking me a lot of questions. He often
> responds to my answers with "Urgh! Object-orientation!" and suchl
Max wrote:
> But today we were discussing the problem of running externally-provided
> code (e.g. add-on modules). Neither of us knew how to do it in C, though
> I suggested using DLLs. However, I quickly installed python on his
> laptop and coded this:
>
> exec "import %s as ext_mod" % raw_in
I have a friend who has been programming in C for many years, and he is
a great fan of the language. However, he (and I) are about to start a
python course, and he has been asking me a lot of questions. He often
responds to my answers with "Urgh! Object-orientation!" and suchlike.
But today we
[EMAIL PROTECTED] writes:
[...]
> > Sometimes putting import statements at the beginning is not feasible
> > (i.e. only when some condition has been met), as importing has some
> > impact on program execution (importing executes code in imported
> > module). This does not resemble Java imports (I d
In article <[EMAIL PROTECTED]>,
Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
>On Tue, 27 Dec 2005 21:35:46 -0600, [EMAIL PROTECTED] declaimed the
>following in comp.lang.python:
>
>> Wow ?! I've only started looking at python but that sounds like very
>> dangerous programming ! Can you give an
On Tue, 27 Dec 2005 21:35:46 -0600, news wrote:
>> Sometimes putting import statements at the beginning is not feasible
>> (i.e. only when some condition has been met), as importing has some
>> impact on program execution (importing executes code in imported
>> module). This does not resemble Java
In article <[EMAIL PROTECTED]>, Jarek Zgoda <[EMAIL PROTECTED]> wrote:
> Gekitsuu napisal(a):
>
> > use strict;
> > use WWW::Mechanize;
> > use CGI;
> >
> > This seems to be the de facto standard in the Perl community but in
> > python it seems most of the code I look at has import statements
>
On 27 Dec 2005 10:02:17 -0800, Gekitsuu <[EMAIL PROTECTED]> wrote:
> My
> hypothetical situation was as follows. I'm writing a new generic SQL
> module and I want to make it so I only call the appropriate module for
> the type of SQL server I'm talking to. Then it would make sense to
> load, for in
"Gekitsuu" wrote:
> That is part of what I was asking but I was also hoping to hear the
> common wisdom so to speak. When I posted I had considered the idea for
> a bit and the situations people have mentioned were similar to the
> scenario I came up with as a good time to break such a rule. My
>
That is part of what I was asking but I was also hoping to hear the
common wisdom so to speak. When I posted I had considered the idea for
a bit and the situations people have mentioned were similar to the
scenario I came up with as a good time to break such a rule. My
hypothetical situation was as
[EMAIL PROTECTED] wrote:
> Gekitsuu wrote:
>> I've been reading a lot of python modules lately to see how they work
>> and I've stumbled across something that's sort of annoying and wanted
>> to find out of there was a good reason behind it. In a Perl program
>> when you're calling other modules yo
Gekitsuu wrote:
> I've been reading a lot of python modules lately to see how they work
> and I've stumbled across something that's sort of annoying and wanted
> to find out of there was a good reason behind it. In a Perl program
> when you're calling other modules you'll add "use" statements at th
On 2005-12-26 05:01:07 -0500, "Gekitsuu" <[EMAIL PROTECTED]> said:
> I've been reading a lot of python modules lately to see how they work
> and I've stumbled across something that's sort of annoying and wanted
> to find out of there was a good reason behind it. In a Perl program
> when you're cal
On Mon, 26 Dec 2005 02:01:07 -0800, Gekitsuu wrote:
> Is there a sound reason for putting the imports
> there are are developers just loading modules in as they need them. I
> own Damian Conway's book of Perl Best Practices and it seems from a
> maintainability standpoint that having all the modu
Gekitsuu napisal(a):
> use strict;
> use WWW::Mechanize;
> use CGI;
>
> This seems to be the de facto standard in the Perl community but in
> python it seems most of the code I look at has import statements
> everywhere in the code. Is there a sound reason for putting the imports
> there are are
I've been reading a lot of python modules lately to see how they work
and I've stumbled across something that's sort of annoying and wanted
to find out of there was a good reason behind it. In a Perl program
when you're calling other modules you'll add "use" statements at the
beginning of your scri
17 matches
Mail list logo