w the target
to be as general as possible!
I'm guessing that about 70% of you will think that this is a horrible
idea, 10% of you will find it compelling, and the remaining 20% will
find themselves conflicted. You can count me in that last category...
--
Alan Bawden
--
https://mail.python.o
David Lowry-Duda writes:
...
For the same reason that the following code doesn't do what some people
might expect it to:
```python
def add_to(elem, inlist=[]):
inlist.append(elem)
return inlist
list1 = add_to(1)
list2 = add_to(2)
print(list1) # prints [1
xv', 'exceptions', 'http', 'item', 'link',
'linkextractors', 'selector', 'signals', 'spiders', 'twisted_version',
'utils', 'version_info']
> I wish there was a convenient way for me
ps://en.wikipedia.org/wiki/Delay-tolerant_networking
https://datatracker.ietf.org/doc/html/rfc4838
https://datatracker.ietf.org/doc/html/rfc5050
--
Alan Bawden
--
https://mail.python.org/mailman/listinfo/python-list
And I missed one that was just published last month:
https://datatracker.ietf.org/doc/html/rfc9171
Unlike RFC 5050, this version of the protocol actually claims to be a
"Proposed Standard".
--
Alan Bawden
--
https://mail.python.org/mailman/listinfo/python-list
somewhere.
But it might be possible to divide and conquer and get better
speed. It all depends on what you are doing. We can't tell.
We cannot answer such a vague question with any specific
solution.
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon
escript or somesuch?
Alan G.
--
https://mail.python.org/mailman/listinfo/python-list
I
displays but so does a Terminal in the background. The SO answer
does mention you can get the Terminal to close when the
script terminates whhich would be better than now. However,
another answer mentions something called Automator, which
I'll need to Google...
Thanks for the pointer thou
Gene Heskett writes:
> You are stating an opinion, but no facts to back it up, so describe your
> environment that makes you write that, please.
If he describes his environment and why he likes it, will that be a
"fact"? Or will you dismiss that as just another "opinion"?
You asked:
> can so
uldn't there also be a concatenation operator that performs
a copy of some kind on its operands?
--
Alan Bawden
--
https://mail.python.org/mailman/listinfo/python-list
an f'{x}{y}{z}'. Apparently the overhead of making just _one_
temporary intermediate string is enough to tip the balance. I'm a bit
surprised that it doesn't take a few more than that. Although I imagine
that that balance might tip at a different point in future releases of
Python (I tested using 3.6.6).
--
Alan Bawden
--
https://mail.python.org/mailman/listinfo/python-list
e encountered since the
mid 1970s (for any programming language or operating system) has assumed
either this convention or, slightly less often, its 4-column variant.
It's surprising that you've never encountered it.
--
Alan Bawden
--
https://mail.python.org/mailman/listinfo/python-list
Chris Angelico writes:
> On Mon, Oct 15, 2018 at 9:56 AM Alan Bawden wrote:
> > In my experience this is a very common way to assume that tabs will be
> > interpreted. Virtually every source-code file I have encountered since the
> > mid 1970s (for any programming languag
more popular Python 2 version. Its latest version is
2.7.11.
I recommend you download the Python 2.7.11 x86_64 MSI installer in
https://www.python.org/ftp/python/2.7.11/python-2.7.11.amd64.msi
- run the installer
Python is installed. You can run it from the command line.
Regards,
Alan
looking at it. I favor a more intuitive syntax over a more concise one.
Regards,
Alan Evangelista
--
https://mail.python.org/mailman/listinfo/python-list
On 05/23/2016 02:52 PM, Ian Kelly wrote:
On Mon, May 23, 2016 at 11:44 AM, Random832 wrote:
On Mon, May 23, 2016, at 13:33, Chris Angelico wrote:
and then you can use the special "tagged literal" syntax, like with special forms of string
literal:
f*22/7 + f*2/11
Fraction(256, 77)
I like t
pers see Python as more pragmatic, more flexible and
quicker/easier/less
bureaucratic to develop than Java, so my opinion may be controversial.
Regards,
Alan Evangelista
--
https://mail.python.org/mailman/listinfo/python-list
On 06/02/2016 02:44 AM, Lawrence D’Oliveiro wrote:
On Monday, May 30, 2016 at 7:17:47 AM UTC+12, Alan Evangelista wrote:
- Java forces everything to be implemented in OO model (classes)
After you have spend a few months battering your head against the rigidity and verbosity of Java,
you will
I am new to this programming adventure. I've gotten past the introductory chapters
in 'How to..." books and now want to start developing a much more complicated
program that I will use repeated for different applications. When I worked in Perl
there was an option to write a program in a text
SyntaxError: invalid syntax
3.6> not [1,2,3] == (not True)
True
3.6> not [] == (not True)
True
3.6> (not []) == (not True)
False
--
Alan Bawden
--
https://mail.python.org/mailman/listinfo/python-list
table of contents disappears off the top.
It's a reasonable request, but this probably isn't the most effective place
to make it.
--
Alan Bawden
--
https://mail.python.org/mailman/listinfo/python-list
tation.
I suspect that given the history of Python, pretty much everybody has
always assumed that a Python implementation will not delete local variables
early. But I agree with you that the Python Language Reference does not
appear to address this question anywhere!
--
Alan Bawden
--
https://mail.python.org/mailman/listinfo/python-list
Gregory Ewing writes:
> Alan Bawden wrote:
> > the Java Language
> > Specification contains the following language:
> >Optimizing transformations of a program can be designed that reduce
> >the number of objects that are reachable to be less than those wh
r...@zedat.fu-berlin.de (Stefan Ram) writes:
> Alan Bawden writes:
> >The Java compiler has no way to know whether a variable references an
> >object with a finalize() method that has side effects
>
> java.lang.Object#finalize() is deprecated since Java 9.
And we
8:24:23)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-28)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> isinstance(True, int)
True
>>> type(True) == int
False
>>> type(True)
--
Alan Bawden
--
https://mail.python.org/mailman/listinfo/python-list
quot;,"w+") as fd:
That makes the window smaller, but it doesn't actually eliminate it. Look
at the generated byte code. In both cases the call to open() is over and
the open file is created _before_ the SETUP_WITH instruction is executed.
--
Alan Bawden
--
https://mail.python.org/mailman/listinfo/python-list
D'Arcy Cain writes:
> On 2019-06-10 15:46, Alan Bawden wrote:
> > D'Arcy Cain writes:
> >> with open("file","w+") as fd:
> >
> > That makes the window smaller, but it doesn't actually eliminate it. Look
> > at the generate
r...@zedat.fu-berlin.de (Stefan Ram) writes:
> for i in range( len( list )- 1, 0, -1 ):
> if list[ i ]is None: del list[ i ]
list = [x for x in list if x is not None]
--
Alan Bawden
--
https://mail.python.org/mailman/listinfo/python-list
Alan Bawden writes:
> r...@zedat.fu-berlin.de (Stefan Ram) writes:
> > for i in range( len( list )- 1, 0, -1 ):
> > if list[ i ]is None: del list[ i ]
>
> list = [x for x in list if x is not None]
Except 'list' is a bad name to use...
--
Alan Bawden
--
storage here. Depending on how much physical
memory you have, you much actually be swapping before you're done.
--
Alan Bawden
--
https://mail.python.org/mailman/listinfo/python-list
. `type.mro' tells you something
about the _implementation_ of `int' and `float' that you _usually_ shouldn't
concern yourself with. Stick to `isinstance' and `issubclass' and
everthing looks pretty kosher.
--
Alan Bawden
--
https://mail.python.org/mailman/listinfo/python-list
iler optimized the tuple
away, but failed to optimize the list away!
--
Alan Bawden
--
https://mail.python.org/mailman/listinfo/python-list
Chris Angelico writes:
> On Mon, Sep 2, 2019 at 12:36 PM Alan Bawden wrote:
...
> > > > a,b = 2,3 and [a,b] = [2,3]
...
> > It looks to me like they generate identical code. The first one calls the
> > construction of a tuple, where the second one calls for the cons
x27; in the process.
In fact, I have been known to add `if __name__' to my colleagues' Python
scripts, just so that I can safely `pydoc' them.
--
Alan Bawden
--
https://mail.python.org/mailman/listinfo/python-list
.« statement). Can you guess what it is?
Well, there's sys.stdin.
But I would expect beginning students to find the effect of typing
"next(sys.stdin)" to the commnd prompt to be a bit confusing...
--
Alan Bawden
--
https://mail.python.org/mailman/listinfo/python-list
rly an error. Kahan doesn't think much of signalling NaNs,
writing that they "exist mainly for political reasons and are rarely used".
--
Alan Bawden
--
https://mail.python.org/mailman/listinfo/python-list
in Python3.8 to test the data type, e.g.
> is_floate(var)
> is_string(var)
> etc. ?
You should probably be using isinstance(), as in:
isinstance(var, float)
isinstance(var, str)
--
Alan Bawden
--
https://mail.python.org/mailman/listinfo/python-list
al.alex...@gmail.com writes:
> Just for the records and to have a fully working bidirectional solution:
>
> >>> ip
> '10.44.32.0'
> >>> struct.unpack('L', socket.inet_aton(ip))[0]
> 2108426
> >>> socket.inet_ntoa(struct.pack(' '10.44.32.0'
> >>>
>
> Good luck ;-)
This will not work as expected
like:
class Main:
value = []
def add(self, x):
self.value += [x]
and be suprised by the resulting behavior.
--
Alan Bawden
--
https://mail.python.org/mailman/listinfo/python-list
n {PIPE_BUF} bytes may have data interleaved, on
arbitrary boundaries, with writes by other processes, whether or not
the O_NONBLOCK flag of the file status flags is set.
--
Alan Bawden
--
https://mail.python.org/mailman/listinfo/python-list
jak writes:
Il 01/01/2021 06:23, Alan Bawden ha scritto:
> jak writes:
>
> Running the command:
>
> $ cat bible.txt > cmdpipe & cat bible.txt > cmdpipe & cat bible.txt >
cmdpipe
>
> the three texts do not mix
>
jak writes:
Il 02/01/2021 01:07, Alan Bawden ha scritto:
> jak writes:
>
> Il 01/01/2021 06:23, Alan Bawden ha scritto:
> > jak writes:
> >
> > Running the command:
> >
> > $ cat bible.txt &g
transmitting your SMSs?
2. If you disable the actual transmission, how many SMSs can your
application generate per second?
HTH,
--
alan kennedy
--
email alan: http://xhaus.com/contact/alan
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, 04 Oct 2005 17:14:45 GMT, Roedy Green
<[EMAIL PROTECTED]> wrote:
>On Tue, 23 Aug 2005 08:32:09 -0500, l v <[EMAIL PROTECTED]> wrote or quoted :
>
>>I think e-mail should be text only.
>
>I disagree. Your problem is spam, not HTML. Spam is associated with
>HTML and people have in Pavlovi
On Sat, 08 Oct 2005 20:43:12 GMT, Roedy Green
<[EMAIL PROTECTED]> wrote:
>On Tue, 04 Oct 2005 17:57:13 -, [EMAIL PROTECTED] (Gordon
>Burditt) wrote or quoted :
>
>>HTML enables a heck of a lot of problems: "web bugs" in email,
>>links to fake sites that appear as real ones in what shows up
>>
On 9 Oct 2005 13:12:43 -0700, [EMAIL PROTECTED] wrote:
>> My grandma doesn't put captions in her photo album,
>> and she doesn't need captions on her photos in email.
>
>She doesn't need captions in the album because she will explain the
>pictures, at length, every single one of them, to anyone wh
On Sun, 09 Oct 2005 00:03:05 +0200, Lasse Vågsæther Karlsen
<[EMAIL PROTECTED]> wrote:
>In any case, html email is here to stay. Or perhaps I should remove html
>and say "richly formatted", whatever that might mean in the future.
>
>But trying to keep your email world into a pure text-based
>no-
On Sat, 15 Oct 2005 02:31:33 GMT, Roedy Green
<[EMAIL PROTECTED]> wrote:
>On 14 Oct 2005 19:01:42 -0700, "Xah Lee" <[EMAIL PROTECTED]> wrote or
>quoted :
>
>>
>>Q: Microsoft's Operating System is used over 90% of PCs. If that's
>>not monopoly, i don't know what is.
>
>They got where they are
On comp.os.linux.misc, in <[EMAIL PROTECTED]>, "Michael Heiming" wrote:
This is your 7th post on this thread, Michael.
You spend a lot of time griping about trolls. Maybe you should
consider not feeding them, you stupid hypocrite.
To all the shit-for-brains trolls that are polluting these group
On comp.os.linux.misc, in <[EMAIL PROTECTED]>, "Tim Slattery" wrote:
Three OS's from corporate kings in their towers of glass,
Seven from valley lords where orchards used to grow,
Nine from dotcoms doomed to die,
One from the Dark Lord Gates on his dark throne
In the Land of Redmond where the
"Matt Garrish" wrote:
That does it. From this point on my newsfilter is killing
(leaving on the server) any articles cross-posted to more than
three groups.
To all of the snivelling punks polluting the Usenet with their
verbal diarrhea here:
Shut up and go away.
Done.
(I haven't read a single
o infrastructure development
required.
http://www.zope.org/Members/tim_one/spread/
http://www.python.org/other/spread/
The latter page has links to the original C spread module, which has
documentation, FAQs, etc.
--
alan kennedy
--
email
troll Xha Lee gets to post
> all sorts of profanity and ranting without any problem?
Take a look at the source of XL's messages: he posts through Google
Groups, thus completely avoiding the SPAM filter on python.org.
http://groups.google.com/group/comp.lang.python/msg/762c8dad1928e
fe's too short to spend your time hacking around artificial barriers
to progress.
--
alan kennedy
--
email alan: http://xhaus.com/contact/alan
--
http://mail.python.org/mailman/listinfo/python-list
need to be aware of.
See the following archive post for how to clean up untrusted (x)html.
http://groups.google.com/group/comp.lang.python/browse_thread/thread/fbdc7ae20353a36d/91b6510990a25f9a
HTH,
--
alan kennedy
--
email alan: h
n ( String args[] )
{
PythonInterpreter interp = new PythonInterpreter();
interp.exec(my_class_source);
interp.exec(create_instance);
interp.exec(invoke_hello);
interp.exec(overwrite_meth);
interp.exec(invoke_hello);
}
}
//
class, e.g.
their methods, by modifying the class itself. Any reference to the
method on the instance will resolve to the method definition from its
class, provided you haven't overwritten the method on the individual
instance. Resolving the method is done at invocation time, beca
FAQ. Isn't that what FAQs are for?
Maybe the FAQ needs to be turned into a wiki?
--
alan kennedy
--
email alan: http://xhaus.com/contact/alan
--
http://mail.python.org/mailman/listinfo/python-list
The Commitments" can attest, is a deep insult a born-and-bred
Northsider such as myself ;-)
--
alan kennedy
--
email alan: http://xhaus.com/contact/alan
--
http://mail.python.org/mailman/listinfo/python-list
[Alan Kennedy]
>>So presumably "chcgil" indicates you're in Chicago, Illinois?
[EMAIL PROTECTED]
> Yes, but why, then, is my name logged into Mountain View, CA?
Presumably the creators of the map have chosen to use a mechanism other
than NNTP-Posting-Host IP addr
[Claire McLister]
> Thanks, Alan. You are absolutely right, we are not using the
> NNTP-Posting-Host header for obtaining the IP address.
Aha, that would explain the lack of precision in many cases. A lot of
posters in this list/group go through NNTP (either with an NNTP client
or throug
[Claire McLister]
> I've made the script available on our downloads page at:
>
> http://www.zeesource.net/downloads/e2i
[Alan Kennedy]
>> I look forward to the map with updated precision :-)
[Claire McLister]
> Me too. Please let me know how we should modify the script
no", then you can use the
"bcp" (Bulk CoPy) utility to transfer data into SQLServer *very* quickly.
http://msdn.microsoft.com/library/en-us/coprompt/cp_bcp_61et.asp
http://www.sql-server-performance.com/bcp.asp
thought-it-was-worth-mentioning-ly y'rs,
--
alan kennedy
--
mples.html
However, even httplib is "synchronous", in that it cannot pipeline
requests: the response to the first request must be competely read
before a second request can be issued.
HTH,
--
alan kennedy
--
email alan: h
l
However, even httplib is "synchronous", in that it cannot pipeline
requests: the response to the first request must be competely read
before a second request can be issued.
HTH,
--
alan kennedy
--
email alan: http://xhaus.com/contact/alan
--
http://mail.python.org/mailman/listinfo/python-list
ata types in python
The official documentaton explains most of it.
You can try the Raw Materials topic in my tutorial if you like.
Alan G
Author of the learn to program web tutor
http://www.freenetpages.co.uk/hp/alan.gauld
--
http://mail.python.org/mailman/listinfo/python-list
information would
be greatly appreciated.
Thanks for your time,
Alan
--
http://mail.python.org/mailman/listinfo/python-list
of the standard library?
No, it's not. Not sure if it ever was.
> if not, what should I use?
Install PyXML
http://pyxml.sourceforge.net
HTH,
--
alan kennedy
--
email alan: http://xhaus.com/contact/alan
--
http://
uot;http://webdav.org";
xmldoc = xml.dom.minidom.Document()
xmlroot = xmldoc.createElementNS(DAV_NS_U, "DAV:xpg")
xmlroot.setAttributeNS(xml.dom.XMLNS_NAMESPACE, "xmlns:DAV", DAV_NS_U)
xmldoc.appendChild(xmlroot)
print xmldoc.toprettyxml()
silly for DOM to produce malformed
>>XML+XMLNS, and of course it is not meant to. The minidom behavior
>>needs fixing, badly.
[Alan Kennedy]
> My interpretation of namespace nodes is that the application is
> responsible for creating whatever namespace declaration attribute nodes
decl, element_ns_uri)
> I'd love to hear how many actual minidom users would agree with you.
>
> It's currently a bug. It needs to be fixed. However, I have no time
> for this bewildering fight. If the consensus is to leave minidom the
> way it is, I
se
expectations match with the guesses made on their behalf will find that
their software is not portable between DOM implementations.
With something as finicky as XML namespaces, you can't just make ad-hoc
decisions as to what the user "really wants". That's why DOM L2 punted
on the whole problem, and left it to DOM L3.
--
alan kennedy
--
email alan: http://xhaus.com/contact/alan
--
http://mail.python.org/mailman/listinfo/python-list
[Alan Kennedy]
>>On the contrary, once you start second guessing the standards and making
>>guesses about what users are really trying to do, and making decisions
>>for them, then some people are going to get different behaviour from
>>what they rightfully expect according
eturn db.newDocument()
def serialise(doc):
format = OutputFormat( doc )
outbuf = StringWriter()
serial = XMLSerializer( outbuf, format )
serial.asDOMSerializer()
serial.serialize(doc.getDocumentElement())
return outbuf.toString()
doc = create_document()
root = doc.createElementNS("DAV:", &qu
ong on this ", "you
misunderstand ", "you're guessing .", etc, then you should be
prepared to back them up, not state them and then say "but I'm too busy
and/or important to discuss it with you&quo
toolkits.
"""
http://cheeseshop.python.org/pypi/libxml2dom
[Alan Kennedy]
>>Will you accept Apache Xerces 2 for Java as a widely used DOM
>>Implementation?
[Fredrik Lundh]
> sure.
>
> but libxml2 is also widely used, so we have at least two ways to interpr
that
> different developers have interpreted the specification in different ways ?
What specification? Libxml2 implements none of the DOM specifications.
--
alan kennedy
--
email alan: http://xhaus.com/contact/alan
--
http://mail.python.org/mailman/listinfo/python-list
[Alan Kennedy]
>>Don't confuse libxml2dom with libxml2.
[Paul Boddie]
> Well, quite, but perhaps you can explain what I'm doing wrong with this
> low-level version of the previously specified code:
Well, if your purpose is to make a point about minidom and DOM standards
indows
users, who are 80+% of my visitors). Javascript is especially
useful since its an easy lead in to learning C/C++, Java,
even Perl to some extent and a lot of sample code sites
use those languages.
Alan G.
Author of the Learn to Program website
http://www.freenetpages.co.uk/hp/alan.gauld
--
http
tal of 13 languages... with 5 geographically dispersed teams
comprising a total of 200 developers (plus about 40 testers).
Interesting times...in the Chinese sense!
Alan G
Author of the Learn to Program website
http://www.freenetpages.co.uk/hp/alan.gauld
--
http://mail.python.org/mailman/listinfo/python-list
assuming I have nothing better to do
than play their game. If that's all I wanted to do I'd stick with
DOS, or buy a Nintendo... I have a multi tasking PC please let me
multi task!
;-)
Alan G.
Author of the Learn to Program website
http://www.freenetpages.co.uk/hp/alan.gauld
--
http
AX terminals too. Finally I think the
curses module allows you to clear a window, including the main
window - ie the terminal screen.
In each case run CLS (or clear) via os.system()
But the bottom line is that there is no builtin command
because the mechanism is different on each platform.
Alan G
uses
client side Javascript to detect changes and send the data
requests to/from the data server... No special frameworks as
such...
HTH,
Alan G.
Author of the Learn to Program website
http://www.freenetpages.co.uk/hp/alan.gauld
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, 03 Jan 2005 02:15:23 +1000, Nick Coghlan
> Alan Gauld wrote:
> > But the bottom line is that there is no builtin command
> > because the mechanism is different on each platform.
>
> I'd have said it was because the inpreter is line-oriented rather than
&
ssed the bulk
of the discussion over the years.
Alan G.
Author of the Learn to Program website
http://www.freenetpages.co.uk/hp/alan.gauld
--
http://mail.python.org/mailman/listinfo/python-list
27;ve done great work with your learning to program site
> and all the help you've given on the python-tutor list:
Aw shucks! Thanks ;-)
Alan G.
Author of the Learn to Program website
http://www.freenetpages.co.uk/hp/alan.gauld
--
http://mail.python.org/mailman/listinfo/python-list
the principles
suddenly made a lot of the "rules of programming" that I'd been
taught make perfect sense (no side-effects, avoid globals, etc)
Its like the fact that I rarely use Maxwell's equations when
designing electronic circuits - but its nice to
know what the underly
page which
compares multiple markup languages, in terms of the above requirements.
If I can't find such a markup language, then I might instead end up
using a WYSIWYG editing component that gives the user a GUI and
generates (x)html.
htmlArea: http://www.htmlarea.com/
Editlet: http://ww
[Alan Kennedy]
>> From what I've seen, pretty much every textual markup targetted
>> for web content, e.g. wiki markup, seems to have grown/evolved
>> organically, meaning that it is either underpowered or overpowered,
>> full of special cases, doesn't have a mean
[Alan Kennedy]
>>So, I'm hoping that the learned folks here might be able to give me
>>some pointers to a markup language that has the following
>>characteristics
[Paul Rubin]
> I'm a bit biased but I've been using Texinfo for a long time and have
> been happ
et-direct-attached printer.
The easiest way by far is to use the Windows Script Host objects
from winall. WSH makes creating windows resources like printers
etc fairly easy.
Alan g.
Author of the Learn to Program website
http://www.freenetpages.co.uk/hp/alan.gauld
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, 24 Jan 2005 17:06:52 +0100, Brane <[EMAIL PROTECTED]> wrote:
> please advice
You can use ncurses via cygwin.
There are DOS ports too but I couldn't get any of them to
work on my XP box, YMMV...
Search the Vaults of Parnassus for the DOS Stuff.
Alan G.
Author of the Le
[Alan Kennedy]
>>However, I'm torn on whether to use ReST for textual content. On the one
>>hand, it's looks pretty comprehensive and solidly implemented. But OTOH,
>>I'm concerned about complexity: I don't want to commit to ReST if it's
>>going t
a period, do you have available for your
project?
Best of luck,
--
alan kennedy
--
email alan: http://xhaus.com/contact/alan
--
http://mail.python.org/mailman/listinfo/python-list
etching it a wee bit, but
it does have some OO features certainly. However if you are
simply using the DB as persistence in the server and for
reporting then an RDBMS should be fine and the technology is well
understood.
Alan G.
Author of the Learn to Program website
http://www.freenetpages
the way I'm doing this now:
def straightforward_collapse(myList):
collapsed = [myList[0]]
for n in myList[1:]:
if n != collapsed[-1]:
collapsed.append(n)
return collapsed
Is there an elegant way to do this, or should I just stick with the code
above?
Thanks,
libraries that
come as part of the standard Python distribution have made my life a lot
easier than it ever was when I was only using C/C++.
Of course, your mileage may vary, depending on what sort of programming
you'd like to do. :)
Hope this helps,
Alan McIntyre
http://www.esrgtech.com
Your first example is along the lines of what I was thinking when I said
"elegant." :) I was looking for something that I could drop into one
or two lines of code; I may not do that if I'm writing code that will
have to be maintained, but it's still nice to know how to do
I think you're right; sometimes I'm susceptible to the "I can do that in
one line of code" temptation. :)
Since this current bit of code will probably end up in something that's
going to be maintained, I will probably stick with the straightforward
method just to be nice to the maintainer (espe
Jack,
I'm not using 2.4 yet; still back in 2.3x. :) Thanks for the examples,
though - they are clear enough that I will probably use them when I upgrade.
Thanks,
Alan
Jack Diederich wrote:
If you are using python2.4,
import itertools as it
[x[0] for (x) in it.gr
101 - 200 of 1267 matches
Mail list logo