"John Machin" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| It's *91* distinct solutions to what appears to be *exactly* your
| problem:
|
| """
| Dudeney (1970, pp. 95-96) also gave the following results for the
| number of distinct arrangements N_u(k,n) of k queens attacking or
"John Machin" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| On Dec 23, 5:38 am, "Terry Reedy" <[EMAIL PROTECTED]> wrote:
| > 'Most flexible' in a different way is
| >
| > def searcher(rex):
| > crex = re.compile(rex)
| > def _(txt):
| > return crex.search(txt)
| >
Hi,
The problem you are trying to solve is a very famous and common
problem which can be solved by backtracking. Please try google with 8
queens problem or n queens problem.
>
> I designed in JavaScript a small program on my website called 5
> queens.
> (http://www.cf29.com/design/dame5_eng.php)
I don't know if it's a bug? Try below code:
>>> from elementtree.ElementTree import Element
>>> a = Element('a')
>>> if a:
... print ''
...
>>> a.__len__()
0
You can see if I test a, the result will be False. I don't know if
it's an expected result, but this thing has beaten me som
On 2007-12-23, Grant Edwards <[EMAIL PROTECTED]> wrote:
> On 2007-12-22, cf29 <[EMAIL PROTECTED]> wrote:
>
>> The goal is to control all the chess board with five queens that do
>> not attack each other.
> [...]
>> My problem starts now. How can I find the next solution and
>> append it to the lis
When you call a new-style class, the __new__ method is called with the
user-supplied arguments, followed by the __init__ method with the same
arguments.
I would like to modify the arguments after the __new__ method is called
but before the __init__ method, somewhat like this:
>>> class Spam(o
Fredrik Lundh wrote:
> John Nagle wrote:
>
>> I'd like to hear more about what kind of performance gain can be
>> obtained from "__slots__". I'm looking into ways of speeding up
>> HTML parsing via BeautifulSoup. If a significant speedup can be
>> obtained when navigating large trees of sma
MI5 Persecution Update: Friday 25 March, 1999
If You Intend To Reply, Please Read This
Please keep your response to one page if you can!. Faxes over a page
or two will be deleted without being read.
The Usual Words
The persecutors-who-wont-admit-theyre-MI5 have been active again this
week.
On Dec 22, 11:03 pm, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
> When you call a new-style class, the __new__ method is called with the
> user-supplied arguments, followed by the __init__ method with the same
> arguments.
>
Only if __new__ returns an object of the type passed i
Hi Fredrik,
Thanks again for your feedback. I am much obliged.
Indeed, I am forced to be exteremely rigorous about decoding on the way in
and encoding on the way out everywhere in my program, just as you say. Your
advice is excellent and concurs with other sources of unicode expertise.
Followi
Steven D'Aprano wrote:
> When you call a new-style class, the __new__ method is called with the
> user-supplied arguments, followed by the __init__ method with the same
> arguments.
>
> I would like to modify the arguments after the __new__ method is called
> but before the __init__ method, som
SMALLp <[EMAIL PROTECTED]> wrote:
>
>Thanks! I've already figured it out from first reply. Now i get selected
>directory and i want to get all directories from thin directory. I found
>os.listdir but it oly gets names of files and i nedd output with
>permisions e.g. -rw-r--r-- 1 pofuk pofuk 10
On Dec 23, 2:39 pm, "Terry Reedy" <[EMAIL PROTECTED]> wrote:
> "John Machin" <[EMAIL PROTECTED]> wrote in message
>
> news:[EMAIL PROTECTED]
> | On Dec 23, 5:38 am, "Terry Reedy" <[EMAIL PROTECTED]> wrote:
> | > 'Most flexible' in a different way is
> | >
> | > def searcher(rex):
> | > crex = r
101 - 113 of 113 matches
Mail list logo