While working on a Jumble-esque program, I was trying to get a
string into a character array. Unfortunately, it seems to choke
on the following
import random
s = abcefg
random.shuffle(s)
returning
File /usr/lib/python2.3/random.py, line 250, in shuffle
x[i],
import random
s = abcdefg
data = list(s)
random.shuffle(data)
.join(data)
'bfegacd'
fit you better?
Excellent! Thanks. I kept trying to find something like an
array() function. Too many languages, too little depth.
The program was just a short script to scramble the
http://beta.python.org
In both Mozilla-suite (1.7) and FireFox (1.5), the links on the
left (the grey-backgrounded all-caps with the at the right)
all intrude into the body text. They're all the same length:
ABOUT covers the T in The Official Python...
NEWS/DOCUMENTATION/DOWNLOAD all
In both Mozilla-suite (1.7) and FireFox (1.5), the links on the left
(the grey-backgrounded all-caps with the at the right) all
intrude into the body text.
Looks fine here on Firefox 1.5 and Konqueror 3.4.3.
Just in case anybody is interested, I've posted screenshots of
how it comes out
The nav styles have crept back in sync with the rest of the
site.. ;-) can you check again and tell me if it looks ok (and
if not get me another screenie?)
Sorry it took so long to get back to you. It looked fine from
home, but the originals were snapped back at work (where my
configuration
I've got an old copy of the html and tried to fix the general problem.
It's currently on another website
http://pyyaml.org/downloads/masterhtml/
This seems to no longer have the problem and scales nicely no
matter which font-size I use. Good work!
-tim
--
At any rate, opinions will always differ. You are always going to get
the people who want a cool flash-based animated site with 3D stereo
surround sound, and the other end of the spectrum where you will be
flamed if you do anything more than hand-code the html, on Unix machines
only,
def onGotFocus(self,evt):
if readonly:
self.Navigate()
This causes the control to react as if the user press 'tab'. By default
it always tabs forwards, but it takes an optional 'IsForward' argument
- set it to False to tab backwards.
Just a pedantic query, not
Additionally, you should be able to copy text from a
read-only control, so ousting the focus may not be quite the
right thing to do.
Good point. Alternative approaches would be to trap
EVT_KEY_DOWN or EVT_TEXT to detect and block attempts to
modify the contents of the control.
Other
Python beginner here and very much enjoying it. I'm looking
for a pythonic way to find how many listmembers are also
present in a reference list. Don't count duplicates (eg. if
you already found a matching member in the ref list, you can't
use the ref member anymore).
Example1:
Python beginner here and very much enjoying it. I'm looking
for a pythonic way to find how many listmembers are also
present in a reference list. Don't count duplicates (eg. if
[snipped]
won't set remove duplicates which he wants to preserve ?
My reading was that the solution shouldn't
py [x for x in '1234' if x%2 else 'even']
[1, 'even', 3, 'even']
I'm guessing this has been suggested before?
You could (in 2.5) use:
[(x if x%2 else 'even') for x in '1234']
This failed on multiple levels in 2.3.5 (the if syntax is
unrecognized, and trying the below with '1234'
I've been digging around, but can't seem to come up with the
right combo of words to google for to get helpful results. Is
there some handy wrapper/module that allows code to target
existance as both a CGI script and a mod_python script, with only
one import statement? Perhaps some common
I seem to be unable to find a way to appends more keys/values to the end
of a dictionary... how can I do that?
E.g:
mydict = {'a':'1'}
I need to append 'b':'2' to it to have:
mydict = {'a':'1','b':'2'}
my understanding is that the order of a dictionary should never
be relied upon.
that means I can neither have a dictionary with 2 identical keys but
different values...?
correct :)
I would need e.g. this:
(a list of ports and protocols, to be treated later in a loop)
ports = {'5631': 'udp', '5632': 'tcp', '3389': 'tcp', '5900': 'tcp'}
#then:
for port,protocol in
orderedDict = [(k,mydict[k]) for k in mydict.keys().sort()]
Unfortunately, the version I've got here doesn't seem to support
a sort() method for the list returned by keys(). :(
I bet it does, but it doesn't do what you think it does. See
http://docs.python.org/lib/typesseq-mutable.html ,
I need to retrieve an integer from within a range ... this
works ... below is my out puts ... it just does not seem so
random ...
Is there perhaps a suggestion out there to create a more
random int ...?
I'm not sure how you determine that it just does not seem so
random...I tried the
When you have a set, known to be of length one, is there a best
(most pythonic) way to retrieve that one item?
# given that I've got Python2.3.[45] on hand,
# hack the following two lines to get a set object
import sets
set = sets.Set
s = set(['test'])
len(s)
Exactly. And I've never heard anyone say to my sons that it's
so unusual that they are born on Jan 30th or June 27th!
Now those born on Feb 29th...they're about a quarter as frequent :)
-tkc
--
http://mail.python.org/mailman/listinfo/python-list
for i in range(2,7):
print | + %10.if % num2 + | #where i would be the iteration
and the num of decimal places
for places in range(2,7):
... print |%10.*f| % (places, num2)
...
| 42.99|
|42.988|
| 42.9877|
| 42.98765|
Say I have some string that begins with an arbitrary
sequence of characters and then alternates repeating the
letters 'a' and 'b' any number of times, e.g.
xyz123aaabbaaabaaaabb
I'm looking for a regular expression that matches the
first, and only the first, sequence of the
Sorry for the confusion. The correct pattern should reject
all strings except those in which the first sequence of the
letter 'a' that is followed by the letter 'b' has a length of
exactly three.
Ah...a little more clear.
r = re.compile([^a]*a{3}b+(a+b*)*)
matches = [s for s
r = re.compile([^a]*a{3}b+(a+b*)*)
matches = [s for s in listOfStringsToTest if r.match(s)]
Wow, I like it, but it allows some strings it shouldn't. For example:
xyz123aabbaaab
(It skips over the two-letter sequence of 'a' and matches 'bbaaab'.)
Anchoring it to the beginning/end might
The below seems to pass all the tests you threw at it (taking the
modified 2nd test into consideration)
One other test that occurs to me would be
xyz123aaabbaaabab
where you have aaab in there twice.
-tkc
import re
tests = [
(xyz123aaabbab,True),
(xyz123aabbaaab, False),
xyz123aaabbaaabab
where you have aaab in there twice.
Good suggestion.
I assumed that this would be a valid case. If not, the
expression would need tweaking.
^([^b]|((?!a)b))*aaab+[ab]*$
Looks good, although I've been unable to find a good
explanation of the negative lookbehind
I want to work on a sudoku brute-forcer, just for fun.
Well, as everybody seems to be doing these (self included...),
the sudoku solver may become the hello world of the new world :)
What is the equivalent way to store data in python? - It isn't obvious
to me how to do it with lists.
Untested, but this should be faster.
block = '0' * 409600
fd = file('large_file.bin', 'wb')
for x in range(1000):
fd.write('0')
fd.close()
Just checking...you mean
fd.write(block)
right? :) Otherwise, you end up with just 1000 0 characters in
your file :)
Is there
fd.write('0')
[cut]
f = file('large_file.bin','wb')
f.seek(40960-1)
f.write('\x00')
While a mindblowingly simple/elegant/fast solution (kudos!), the
OP's file ends up with full of the character zero (ASCII 0x30),
while your solution ends up full of the NUL character (ASCII 0x00):
I know that the standard idioms for clearing a list are:
(1) mylist[:] = []
(2) del mylist[:]
I guess I'm not in the slicing frame of mind, as someone put it, but
can someone explain what the difference is between these and:
(3) mylist = []
Why are (1) and (2) preferred? I
I have a real newbie question here.
Well, as a starter, it would be helpful if you included a
Subject: line in your mail...my spam filters flagged it and I
almost tossed it in my bit-bucket because the subject was empty. :*)
On WinXP I open a command line and type 'python' and get 'PYTHON'
parameter=12ab
parameter=12ab foo bar
parameter='12ab'
parameter='12ab' biz boz
parameter=12ab
parameter=12ab junk
in each case returning 12ab as a match. parameter is known and fixed.
The parameter value may or may not be enclosed in single or double
quotes, and may or may not be the
I have a string input from the user, and want to parse it
to a number, and would like to know how to do it. I
would like to be able to accept arithmetic operations,
like:
'5+5'
'(4+3)*2'
'5e3/10**3'
I thought of using eval, which will work, but could lead
to bad security problems
Anyone know how to implement breadth first search using Python?
Yes. Granted, for more details, you'd have to describe the data
structure you're trying to navigate breadth-first.
Can Python create list dynamically
Is Perl write-only?
Does Lisp use too many parens?
Of course! :)
Not only
Thanks for your reply and the structure of the file structure going to be
read is
total number of nodes
first nodesecond nodedistance from first node to second node
...
end of file represented by -1
The aims is to find out the shortest path(s) for the leaf node(s)
Example:
9
0 1 1
I myself have just begun using vim. Does anyone have any
tips/convenient tweaks for python programming with it?
For python programming several settings can make life far less
painful (assuming you like 4-spaces-per-tab) :
set ai ts=4 sw=4 et
or
set ai ts=4 sw=4 noet
I downloaded the Python 2.4.2 msi file, and installed it.
All went well. Now, I have no idea what to do.
I read the documentation, README files, etc., and it looks like I'm
supposed to configure it with a ./configure command,and then a magical
make command.
I suspect you were reading
You have a list of unknown length, such as this: list =
[X,X,X,O,O,O,O]. You want to extract all and only the X's. You know
the X's are all up front and you know that the item after the last X is
an O, or that the list ends with an X. There are never O's between
X's.
I have been using
def lowest(s1,s2):
s =
for i in xrange(len(s1)):
s += lowerChar(s1[i],s2[i])
return s
this seems unpythonic, compared to something like:
def lowest(s1,s2):
s =
for c1,c2 in s1,s2:
s += lowerChar(c1,c2)
return s
If I understand correctly,
How do I detect non-ascii letters in a string? I want to detect the
condition that a string have a letter that is not here:
string.ascii_letters
I don't know how efficient it is, but it's fairly clean:
clean_string = ''.join([c for c in some_string if c in
string.ascii_letters])
If you
Trying to get my feet wet with wxPython (moving from just
command-line apps), I tried the obvious (or, at least to me
was obvious):
Start python, import wx and then do a help(wx) to see
what it can tell me.
Unfortunately, it spewed back a handful of errors, gasped,
wheezed and died
Let's say I have two dictionaries:
dict1 is 1:23, 2:76, 4:56
dict2 is 23:A, 76:B, 56:C
How do I get a dictionary that is
1:A, 2:B, 4:C
d1={1:23,2:76,4:56}
d2={23:a, 76:b, 56:c}
result = dict([(d1k,d2[d1v]) for (d1k, d1v) in d1.items()])
result
{1: 'a', 2: 'b', 4: 'c'}
If
Uniqueness imposes an odd constraint that you can't have
synonyms in the set:
shades = enum({white:100, grey:50, gray:50, black:0})
Blast, I hate responding to my own posts, but as soon as I
hit Send, I noticed the syntax here was biffed. Should have
been something like
shades =
Are there any Python libraries implementing measurement of similarity
of two strings of Latin characters?
It sounds like you're interested in calculating the Levenshtein
distance:
http://en.wikipedia.org/wiki/Levenshtein_distance
which gives you a measure of how different they are. A
self.tasks[:] = tasks
What I do not fully understand is the line self.tasks[:] = tasks. Why
does
the guy who coded this did not write it as self.tasks = tasks? What is
the
use of the [:] trick ?
It changes the list in-place. If it has been given to other objects, it
might
If i enter a center digit like 5 for example i need to create two
vertical and horzitonal rows that looks like this. If i enter 6 it shows
6 six starts. How can i do this, because i don't have any clue.
*
* *
* *
* *
*
Well we start by introducing the neophite programmer to
I have a tuple of tuples, in the form-- ((code1, 'string1'),(code2,
'string2'),(code3, 'string3'),)
Codes are unique. A dict would probably be the best approach but this
is beyond my control.
Here is an example:
pets = ((0,'cat'),(1,'dog'),(2,'mouse'))
If I am given a value for the
Can anyone tell me how to find current working user in windows?
The below should be fairly cross-platform:
import getpass
whoami = getpass.getuser()
print whoami
W: tchase
L: tim
(W: is the result on my windows box, L: is the result on my
Linux box) which can be used in concert
What is dream hardware for the Python interpreter?
The only dream hardware I know of is the human brain. I have a
slightly used one myself, and it's a pretty mediocre Python interpreter.
the human brain may be a pretty mediocre Python interpreter, but
darn if I don't miss
import dwim
I am new to python. Infact started yesterday and feeling out of place.
I need to write a program which would transfer files under one folder
structure (there are sub folders) to single folder. Can anyone give me
some idea like which library files or commands would be suitable for
this file
I have a file with a lot of the following ocurrences:
denmark.handa.1-10
denmark.handa.1-12344
denmark.handa.1-4
denmark.handa.1-56
Each on its own line? Scattered throughout the text? With other
content that needs to be un-changed? With other stuff on the
same line?
Ok the problem we had been asked a while back, to do a programming
exercise (in college)
That would tell you how many days there are in a month given a
specific month.
Ok I did my like this (just pseudo):
If month = 1 or 3 or etc
noDays = 31
Elseif month = 4 or 6 etc
I need to parse the file in such a way to extract data out of the html
and to come up with a tab separated file that would look like OUTPUT-
FILE below.
BeautifulSoup[1]. Your one-stop-shop for all your HTML parsing
needs.
What you do with the parsed data, is an exercise left to the
reader,
I'm just starting to learn some Python basics and are not familiar with
file handling.
Looking for a python scrip that zips files. So aaa.xx bbb.yy ccc.xx
should be zipped to aaa.zip bbb.zip ccc.zip
I haven't been able to type more than 'import gzip'..
Well, you ask for zip files, but
Thanks! Works indeed. Strange thing is though, the files created are the
exact size as the original file. So it seems like it is zipping without
compression.
The instantiation of the ZipFile object can take an optional
parameter to control the compression. The zipfile module only
supports
OP stated requirements were to move all the files into a single
folder. Copytree will preserve the directory structure from the source
side of the copy operation.
well, it would be copying [not moving] files through Python,
but if the desire is to flatten the tree into a single directory,
HTML. Text-only docs are so last-cen.
My sarcasometer is broken today... are you being serious?
man serious
As opposed to woman serious?
[EMAIL PROTECTED]:~$ man -k serious
serious: nothing appropriate.
-tkc
--
http://mail.python.org/mailman/listinfo/python-list
You Used Python to Write WHAT?
http://www.cio.com/article/185350
Furthermore, the power and expressivity that Python offers means
that it may require more skilled developers.
[...down to the summary...]
Python may not be an appropriate choice if you:
[...]
* Rely on teams of less-experienced
mytable = {a : myname}
re.SomeNewFunc(compilexp, mytable)
myname
how does SomeNewFunc know to pull a as opposed to any other key?
mytable = {a : 1}
re.SomeNewFunc(compileexp, mytable)
ERROR
You could do something like one of the following 3 functions:
import re
ERROR = 'ERROR'
Newbies learn, and the fundamental C++ lessons are usually
learnt quite easily.
Ah yes...that would be why Scott Meyers has written three
volumes[1] cataloging the gotchas that even experienced C++
programmers can make...
And the 1030 page Stroustrup C++ reference is easily comprehended
by
I am trying to find a way to output how long a script took to run.
Obviously the print would go at the end of the script, so it would be
the time up till that point. I also run a PostgreSQL query inside the
script and would like to separately show how long the query took to
run.
Is this
import random
from pylab import *
x = random.uniform(0,1)
Traceback (most recent call last):
I suspect that
'random' in dir(pylab)
returns True...this would be one of those reasons that from
module import * is scowled upon. You have to know what
module is dumping into your namespace,
AFAIK, there is no single blessed template system. If you're up to web
development then your choice of framework will limit the choices for
template engines. For example if you choose Django I guess you'll have
to stick with its built-in template system (I might be wrong on this)
Django's
How would you get the last 4 items of a list?
Did you try the same get the last 4 items solution that worked
for a string?
lst[-4:]
-tkc
--
http://mail.python.org/mailman/listinfo/python-list
I didn't have any trouble setting up mod_python Django. However, I
am my own hosting provider. That may make a difference. ;-)
I can install fastcgi if it's a big win.
From my understanding, the python-code under mod_python runs as
whatever Apaches runs as (www, wwwdata, whatever). If
ignored_dirs = (
r.\boost\include, # It's that comma that makes this a tuple.
)
Thanks for reminding me of this. I always forget that!
Now that it is correctly doing *only* whole string matches, what if I want
to make it do a substring compare to each string in my ignored_dirs
I'm searching for a simple
bin2chr(01110011) function that can convert all my 8bit data to a
chr so I can use something like this:
print ord(s) # = 115
print bin(ord(s)) # = 01110011
test= open('output.ext,'wb')
test.write(bin2chr(01110011))
test.write(bin2chr(0011))
if (condition1) and (condition2) and (condition3):
do_something()
Is there a guarantee that Python will evaluate those conditions in order (1,
2, 3)? I know I can write that as a nested if, and avoid the problem
altogether, but now I'm curious about this ;).
Yes, Python does
I have made this string:
TITLE = 'Efficiency of set operations: sort model,
(cphstl::set::insert(p,e)^n cphstl::set::insert(e)), integer'
But I am not allowed to break the line like that:
IndentationError: unexpected indent
How do I break a line?
Depends on
Ok thanks! Btw why double quotes instead of single ' ?
Either one will do...there's not much difference. I try to use
double-quotes most of the time, just so when I include an
apostrophe in-line (which I do more often than I include a
double-quote in-line), I don't have to think.
Is there an easy way to make string-formatting smart enough to
gracefully handle iterators/generators? E.g.
transform = lambda s: s.upper()
pair = ('hello', 'world')
print %s, %s % pair # works
print %s, %s % map(transform, pair) # fails
with a
TypeError: not enough arguments for
Is there an easy way to make string-formatting smart enough to
gracefully handle iterators/generators? E.g.
transform = lambda s: s.upper()
pair = ('hello', 'world')
print %s, %s % pair # works
print %s, %s % map(transform, pair) # fails
with a
TypeError: not enough
Note that your problem has nothing to do with map itself.
String interpolation using % requires either many individual
arguments, or a single *tuple* argument. A list is printed
as itself.
Just as an exercise to understand this better, I've been trying
to figure out what allows for this
I have some data with some categories, titles, subtitles, and a link
to their pdf and I need to join the title and the subtitle for every
file and divide them into their separate groups.
So the data comes in like this:
data = ['RULES', 'title','subtitle','pdf',
I V wrote:
On Fri, 29 Feb 2008 08:18:54 -0800, baku wrote:
return s == s.upper()
A couple of people in this thread have used this to test for an upper
case string. Is there a reason to prefer it to s.isupper() ?
For my part? forgetfulness brought on by underuse of .isupper()
-tkc
--
I'm certain there is an API for creating
GUI's but as far i can find it in the
http://docs.python.org/tut/tut.html
the only gui is in Guido.
What do i miss?
The batteries-included GUI:
import tkininter
Add-on solutions include wxPython, PythonCard and many others. GIYF:
|I upload a new version. Add more print log into my code to help people
| understand my program
Announcements should include a short paragraph explaining what the
announcement is about for those of us not in the know. IE, what is
STUN? -- and therefore, what is a STUN client?
I believe
For instance, if you have a (trivial) if...elif...else like this:
if a == 0:
do_task_0()
elif a == 1:
do_task_1()
elif a == 2:
do_task_2()
else:
do_default_task()
You could roll it up into a for...else statement like this:
for i in range(3):
if a == i:
Hi friends. Someone know how to work with python and exchange
server?.
I've used both imaplib[1] and smtplib[2] (in the standard
library) for talking successfully with an Exchange server. I
don't do much with POP3, but there's also a poplib module[3] in
the standard library. I just wrote
I am trying to execute an update to a sqlite3 db via a python cgi
If you're running as a CGI, your script (as you guess below) will
usually run with the effective permissions of the web-server.
Frequently, this is some user such as wwwdata or www.
conn = sqlite3.connect('db')
Make sure that
if (match = re.search('(\w+)\s*(\w+)', foo)):
Caveat #1: use a raw string here
Caveat #2: inline assignment is verboten
match = re.search(r'(\w+)\s*(\w*+)', foo)
if match:
field1 = match.group(1)
field2 = match.group(2)
This should then work more or less. However, since you
Class Sample:
fullname = 'Something'
How can I know that this class has an attribute called 'fullname'?
with the builtin hasattr() function :)
class Sample: fullname='Something'
...
hasattr(Sample, 'fullname')
True
-tkc
--
http://mail.python.org/mailman/listinfo/python-list
import os, sys
pyfile = (sys.platform[:3] == 'win' and 'python.exe') or 'python'
Okay, run on a win32 machine, pyfile evaluates to python.exe
[snip]
Now. Run this on linux. The first condition evaluates sys.platform[:3]
== 'win' as false.
[snip]
Where am I going wrong. And when will this
I am a GNU newbie. (I know C o.) Can you point me to a
place to find the source for 'date'?
It's part of the GNU Coreutils:
http://ftp.gnu.org/gnu/coreutils/
Within the file, you're likely interested in lib/getdate.*
It helps if you have a working knowledge of Yacc.
-tkc
--
s=re.sub(r'\n','\n'+spaces,s)
s=re.sub(r'^',spaces,s)
s=re.sub(r' *\n','\n',s)
s=re.sub(r' *$','',s)
s=re.sub(r'\n*$','',s)
Is there any chance that these will be cached somewhere, and save
me the trouble of having to declare some global re's if I don't
want to have
i wrote a function to parse a given directory and make a sorted list
of files with .txt,.doc extensions .it works,but i want to know if it
is too bloated..can this be rewritten in more efficient manner?
here it is...
from string import split
from os.path import isdir,join,normpath
from
why does this occur when using the python windows extensions? all
string are prefixed by a lowercase u.
They are Unicode strings:
http://docs.python.org/ref/strings.html
is there a newsgroup explicitly for python windows extensions?
Not that I know of, other than what's described here:
royG wrote:
On Mar 10, 8:03 pm, Tim Chase wrote:
In Python2.5 (or 2.4 if you implement the any() function, ripped
from the docs[1]), this could be rewritten to be a little more
flexible...something like this (untested):
that was quite a good lesson for a beginner like me..
thanks guys
Gerhard Häring wrote:
[EMAIL PROTECTED] wrote:
aggdraw-1.2a3-20060212.tar.gz
Try shegabittling the frotz first. If that doesn't help, please post the
output of the compile command that threw the error.
Maynard: He who is valiant and pure of spirit may find the
compiling instructions in
The subject says pretty much all,
Given what I understand about the BEGIN block[1], this is how
Python works automatically:
bash$ cat a.py
print 'a1'
import b
print 'a2'
bash$ cat b.py
print 'b'
bash$ python a.py
a1
b
a2
However, the first import does win and
Currently I'm just putting this at the top of the file:
py=1
funcpre=2
funcpost=3
...
That can be done more compactly with
py, funcpre, funcpost = range(3)
I've harbored a hope that a combination of PEP 3132[1] (Extended
Iterable unpacking) and
I have these annoying textilfes that are delimited by the ASCII char for
(only its a single character) and (again a single character)
Their codes are 174 and 175, respectively.
My datafiles are in the moronic form
XYZ
I need to split on those freaking characters. Any tips on how
I'm neophite about python, my target is to create a programa that
find a specific string in text file.
How can do it?
FNAME1 = 'has.txt'
FNAME2 = 'doesnt_have.txt'
TEXT = 'thing to search for'
TEXT in file(FNAME1).read()
True
TEXT in file(FNAME2).read()
False
or that may not be
I really should say net cast as I think it's a better term ;)
Does anyone have any recommended net casts on Python, or programming in
general?
Well, though it's been a while since I last noticed a new release
(last one dated Dec '07), the archives of Python 411 should all
be online:
Are there any simillar key combination in Python Shell like Linux Ctrl+R
(reverse-i-search) to search the command history?
It must depend on how your version of Python was built...mine
here on my Linux box has exactly that functionality. I press ^R
and start typing, and the line comes up
class example:
def __init__(self, foo, bar):
self.foo = foo
self.bar = bar
def method(self):
print method ... :
print self.foo
print self.bar
if __name__ == __main__:
obj = example
This makes obj a synonym for example. You want
How can I check the validity of absolute urls with http scheme?
example:
http://www.example.com/something.html; - valid
http://www.google.com/ + Brite_AB_Iframe_URL + - invalid
You could try something like
import urllib
tests = (
(http://www.google.com/ + Brite_AB_Iframe_URL + ,
datum = 2008-03-14
the_date = re.split('^([0-9]{4})-([0-9]{2})-([0-9]{2})$', datum, 3)
print the_date
Now the result that is printed is:
['', '2008', '03', '14', '']
My question: what are the empty strings doing there in the beginning and
in the end ? Is this due to a
When I run this script, I got the following exception:
Exception exceptions.AttributeError: 'NoneType' object has no
attribute 'population' in bound method Person.__del__ of
__main__.Person instance at 0xb7d8ac6c ignored
To to newcomer like me, this message doesn't make much sense. What
Any good genetic algorithms involving you-split, i-pick?
I've always heard it as you divide, I decide...
That said, I'm not sure how that applies in a GA world. It's
been a while since I've done any coding with GAs, but I don't
recall any facets related to the You Divide, I Decide problem.
In most of the languages ^ is used for 'to the power of'.
No, not in most languages. In most languages (C, C++, Java, C#, Python,
Fortran, ...), ^ is the xor operator ;)
...and in Pascal it's the pointer-dereferencing operator...
-tkc
--
1 - 100 of 2411 matches
Mail list logo