Hello Jabba,
Did you ever find a solution to the problem? If so, can you please post it?
Thanks,
Jonathan
--
View this message in context:
http://python.6.n6.nabble.com/calling-a-simple-PyQt-application-more-than-once-tp4335946p4975385.html
Sent from the Python - python-list mailing list
[EMAIL PROTECTED] wrote:
> Thought I'd offer a method for solving all possible 9x9 sudoku puzzles
> in one go. It'll takes a bit of time to run however (and 9x9 seems to
> be about as big as is reasonably possible before combinatorial
> explosion completely scuppers this type of program)...
>
> B
On Saturday, November 9, 2013 8:27:02 AM UTC-5, Joshua Landau wrote:
> `select` is quite an odd statement, in that in most cases it's just a
> weaker variant of `if`. By the time you're at the point where a
> `select` is actually more readable you're also at the point where a
> different control f
27;'
edit_table += ''
if russian != None:
edit_table += '''''' % locals()
edit_table += '\n'
edit_table += ''
edit_table += '''''' % locals()
edit_table += ''
ne conversion would be incorrect, and what I
could do to fix it? In fact if anyone even has any pointers to where this might
be going wrong I'd be very helpful, I've done a lot of hours of fiddling with
this and googling to no avail.
Thanks,
Jonathan
#!/usr/bin/env python2.6.4
impo
e and supports
introspection. It supports parallel deployments, and interactivity. And it has
a nice commandline shell with autocompletion for traversing the deployment tree.
The repository:
https://github.com/jonathanslenders/python-deployer/tree/refactoring-a-lot-v2
Suggestions welcome :)
Jon
Thanks everyone, I'll think about it.
The main reason is that I'm working on the documentation, and this a a good
opportunity to think about the naming. python-deploy-framework or
python-deployer could be too boring.
--
http://mail.python.org/mailman/listinfo/python-list
Le mardi 25 juin 2013 06:38:44 UTC+2, Chris Rebert a écrit :
> Er, Salt is likewise written in Python.
You're right. Salt is also Python, excuse me, and it's very powerful as well.
--
http://mail.python.org/mailman/listinfo/python-list
Hello
It isn't
Having been frustrated with out of date books, specifically the Apress
published 'Definitive Guide To Django', I've downloaded the Kindle edition
of Django 1.4 documentation
It's a good tutorial
J
On Mon, Jul 2, 2012 at 11:00 AM, levi nie wrote:
> Is Django v1.3 documentation t
On Wednesday, 22 August 2012 22:03:48 UTC+10, sajuptpm wrote:
> Hi,
>
>
>
> psphere: Python interface for the VMware vSphere Web Services SDK
>
>
>
> I already developed an app using https://bitbucket.org/jkinred/psphere. But
> getting lot of errors since psphere is not thread safe (I think
On Sunday, 26 August 2012 22:45:25 UTC+10, jonatha...@gmail.com wrote:
> On Wednesday, 22 August 2012 22:03:48 UTC+10, sajuptpm wrote:
>
> > Hi,
>
> >
>
> >
>
> >
>
> > psphere: Python interface for the VMware vSphere Web Services SDK
>
> >
>
> >
>
> >
>
> > I already developed an
Incidentally and I know this is region specific, but what's the average
salary approximately in the US/UK for a Senior Python programmer?
ITJobsWatch in the UK says - http://www.itjobswatch.co.uk/jobs/uk/python.do
Is that about right?
Jon.
On 18 September 2012 08:40, Paul Rudin wrote:
> nithi
tion is a bit crude, but it is
reasonably powerful.
I have other things on the agenda, like making it able to run scripts and
doing fuzzy matching, but for now those are the main two attractions.
On Wed, Oct 3, 2012 at 8:52 AM, Amirouche Boubekki <
amirouche.boube...@gmail.com> wrote:
> H
12 at 11:25 AM, Amirouche Boubekki <
amirouche.boube...@gmail.com> wrote:
>
>
> 2012/10/3 Jonathan Hayward
>
>> The chief benefit besides the searching, so far, is that you can use Py3k
>> mixed with shell commands as the scripting language--so script in Python
>>
dict.get(inp, None)
That returned value is actually callable! That is, you can then do
something like:
fn("This is the input string")
Of course, as you already know, you should test fn to see if it is
None. If so, they typed in an option you don't recognize.
Secondly
On Jul 13, 1:39 pm, Anthony Kong wrote:
> (My post did not appear in the mailing list, so this is my second try.
> Apology if it ends up posted twice)
>
> Hi, all,
>
> If you have read my previous posts to the group, you probably have some idea
> why I asked this question.
>
> I am giving a few
On Jul 14, 4:32 am, Gregory Ewing wrote:
> Anthony Kong wrote:
> > So I have picked this topic for one of my presentation. It is because
> > functional programming technique is one of my favorite in my bag of python
> > trick.
>
> I'm not sure it's a good idea to emphasise functional
> programmi
Hey! Is Billy a responder, rather than the OP? Sorry then! My previous point is
entirely nullified.
--
http://mail.python.org/mailman/listinfo/python-list
Hey Billy. That may not be the important part of the code, but the many people
giving up their free time to read it and help you don't know that. It's
probably most helpful to give them a working example so as not to waste their
time. Just sayin for future, is all. :-)
Best regards,
character's name. 1
Traceback (most recent call last):
File "./telnetsubprocess.py", line 17, in
cmd = raw_input()
EOFError
Connection closed by foreign host.
Any ideas on what is going on here?
--
Jonathan Gardner
jgard...@jonathangardner.net
--
http://mail.python.org/mailman/listinfo/python-list
whirl!
>
That code is surprisingly simple. Let me write one that uses asyncore
so that the looping can incorporate other async processes as well.
--
Jonathan Gardner
jgard...@jonathangardner.net
--
http://mail.python.org/mailman/listinfo/python-list
I have found this approach problematic if you have packages separately
developed and maintained in different directory trees, resulting in
more than one PYTHONPATH entry with the same root metapackage name.
What happens is that only the first entry in the PYTHONPATH containing
the metapackage name
See inline comments
On Wed, Mar 23, 2011 at 2:13 PM, Alex Willmer wrote:
> On Mar 23, 3:20 pm, T wrote:
> > Thanks! argparse is definitely what I need..unfortunately I'm running
> > 2.6 now, so I'll need to upgrade to 2.7 and hope that none of my other
> > scripts break.
>
> Argparse was a thi
On Apr 20, 2:43 pm, Andreas Tawn wrote:
> > Algis Kabaila writes:
>
> > > Are there any modules for vector algebra (three dimensional
> > > vectors, vector addition, subtraction, multiplication [scalar
> > > and vector]. Could you give me a reference to such module?
>
> > NumPy has array (and mat
.net/docs/pph/
Also, where I work we have tried many IDEs, but happily and
productively use GVim and very little else, so don't feel you *have*
to use an IDE.
Best regards,
Jonathan Hartley
--
http://mail.python.org/mailman/listinfo/python-list
ample, G{author} will
be replaced with the value for 'author' supplied either on the command-line:
$ genesis myproj author=Jonathan
Or in your ~/.genesis/config file (a python file read using 'exec'):
author = 'Jonathan'
* The default template should embody go
Hey Chris,
Thanks for the thoughts. I must confess I had already given up on a 'single
file' approach, because I want to make it easy for people to create their own
templates, so I have to handle copying a template defined by creating a new
directory full of diles. If I'm already handling this
C is the same as its declaration,
but with the variable name deleted. So:
char (*(*[3])())[5]
That is, an array of 3 pointers to functions that return pointers to
arrays of 5 characters.
Jonathan
--
https://mail.python.org/mailman/listinfo/python-list
ot@919d94c98191:/# apt-get --yes install python3
root@919d94c98191:/# cat >play.py <play.py < //play.py(5)()
-> x == y
(Pdb) s
--Call--
> /usr/lib/python3.10/uuid.py(239)__eq__()
-> def __eq__(self, other):
Thank you,
Jonathan
--
https://mail.python.org/mailman/listinfo/python-list
d on the left operand. If that method
> doesn't exist or returns NotImplemented, it then looks for a dunder
> method on the right operand.
reads like the contents of the do_richcompare function.
What I think I'm missing is how do the dunder methods relate to
the tp_richcompare functio
I'm still wondering how Py_TYPE(v)->tp_richcompare resolves to __eq__
on a user-defined class. Conversely, my understanding is, for a type
defined in cpython, like str, there is usually an explicitly
defined tp_richcompare function.
Thank you,
Jonathan
On Fri, May 13, 2022 at 8:23 PM
I have a great idea of what's going on,
now. I appreciate you all.
My goal now is to be able to work with the debugger, like Erik is, so that
next time I am able to perform this investigation in-full. Should I create
a new thread for this question?
Thank you,
Jonathan
On Sat, May 14, 2022
Good day,
Great job on making Python easily accessible.
I'm using a Windows 10, 64gb HP EliteBook.
I've been trying to configure my laptop to run python scripts.
This is the error I keep getting:
Python was not found; run without arguments to install from the Microsoft
Store, or disable this sho
and
didn't work because the tutorial was done on a MacBook,
while I'm using a Windows device.
Thanks for your help,
Regards
On Mon, Aug 15, 2022 at 8:14 AM Eryk Sun wrote:
> On 8/13/22, Jonathan Owah wrote:
> >
> > I've been trying to configure my laptop to run
//tinyurl.com/blindcodersurvey
Finally, The Holman Prize:
https://holman.lighthouse-sf.org/
best regards
Jonathan
--
https://mail.python.org/mailman/listinfo/python-list
thon installed at
c:\Program Files\Python3.10 whereas it has actually been installed at
D:\Users\jgoss\AppData\local\python\python3.10. It seems that the launcher
has not been updated to the latest installation location for python and
that it also needs to handle a non-default install location. The
about:
>
> Use syntax highlighting, use a smart editor, use a version control system,
> use a linter, use 'tabnanny', use tool X, Y or Z to get around the
> problems, use obscure language options..
>
> The thing is, if everyone does depend more on such tools, then it reall
Hi List,
Lets say I want to know if the value of `x` is bool(True).
My preferred way to do it is:
if x is True:
pass
Because this tests both the value and the type.
But this appears to be explicitly called out as being "Worse" in PEP8:
"""
Don't compare boolean values to True or False usin
Some gotcha tips from using SQLite with Python that I've encountered.
You may already know some/all of these:
* SQLite doesn't have a "Truncate" function - simply delete the file if
possible for larger datasets.
* Explicitly committing is good because the default python sqlite3
library does it
* To be reliably INSERTed Byte data should be first converted to
sqlite3.Binary(my_data) explicitly
Interesting. Is that Python 2 specific, or also in Python 3. Because
the latter would surprise me (not saying it isn't the case).
Only tried on Python 3. I'm inserting raw byte versions of web
On Wed, Mar 4, 2020 at 1:02 PM Ned Deily wrote:
> Details here:
>
>
> https://discuss.python.org/t/python-3-7-7rc1-is-now-available-for-testing/3638
"Assuming no critical problems are found prior to *2020-02-10*..."
I would like to know how you expect people to travel back in time to report
pr
--
I am attempting to learn how to use asyncio and I have been unable to find
any documentation or Internet posts that give information on the principles
underlying asyncio, let alone any examples showing how asynchronous
generators should be used. I have built a toy program to test trying to
read
.
--
Jonathan Gossage
--
https://mail.python.org/mailman/listinfo/python-list
I have the following code and I would like to type the variable *contents*:
contents: something = importlib._import_module(name)
I have been unable to find out what *something* should be.
--
Jonathan Gossage
--
https://mail.python.org/mailman/listinfo/python-list
7;s no self...
>
>
Oops, you forgot to return object.__new__(cls, x) in the case the
object isn't in the cache. That should fix it.
Jonathan
http://cleverdevil.org
--
http://mail.python.org/mailman/listinfo/python-list
twice
as fast? 5x as fast?
thanks,
-Jonathan
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> does collections.deque have a blocking popleft()? If not, it's not very
> suitable to replace Queue.Queue.
It does not.
-Jonathan
--
http://mail.python.org/mailman/listinfo/python-list
I would argue with your assertion that either TKinter of PyGTK are the
best. There are several other good alternatives, including wxPython and
PyQt, which are very comparable, if not better.
I would strongly suggest starting with PyQt. It's my personal favorite.
I wrote a short tutorial on the Pyt
I don't know what engine you are using. Basically all you have to do is
render the login form at the url of the page that needs the login.
You're going to have to hook in the authentication code before you
render the page normally. For instance, this is a common way I've been
doing it in various en
> # etc
So to write this using the suggested syntax one has:
> def return_dict(data:dict=None):
> # oops!
So now some final comments.
1. I have no opinion yet about optional static typing.
2. Calls of function f() should outnumber definitions of f().
(I'm not totall
Jeff Shannon wrote:
Jonathan Fine wrote:
Giudo has suggested adding optional static typing to Python.
(I hope suggested is the correct word.)
http://www.artima.com/weblogs/viewpost.jsp?thread=85551
An example of the syntax he proposes is:
> def f(this:that=other):
> print this
I
Dan Stromberg wrote:
> Has anyone tried to construct an HTML janitor script using
BeautifulSoup?
>
> My situation:
>
> I'm trying to convert a series of web pages from .html to palmdoc
format,
> using plucker, which is written in python. The plucker project
suggests
> passing html through "tidy",
Jonathan Fine wrote:
I'll post some usage examples later today, I hope.
Well, here are some examples. A day later, I'm afraid.
** Pipelines and other composites
This is arising for me at work.
I produce Postscript by running TeX on a document.
And then running dvips on the output of T
Jeff Shannon wrote:
Jonathan Fine wrote:
The use of *args and **kwargs allows functions to take a variable number
of arguments. The addition of ***nsargs does not add significantly.
I've posted usage examples elsewhere in this thread.
I think they show that ***nsargs do provide a benefi
ot, at this time, wishing to promote my suggestion.
If I were, I would be well advised to find usage cases.
Rather, I simply wish to point out that the
f(this:that=other)
syntax may have uses, other than optional static typing.
And this I've done. So for me the thread is closed.
Jonathan
--
http://mail.python.org/mailman/listinfo/python-list
Xah Lee wrote:
adding to my previosu comment...
*plonk*
--
"Women should come with documentation." - Dave
--
http://mail.python.org/mailman/listinfo/python-list
__name__ == '__main__':
doit('add this that')
doit('times this that')
===
Jonathan
--
http://mail.python.org/mailman/listinfo/python-list
widget with
an
> image in it? Thanks.
>From my experience, the Gnuplot module isn't designed to be used in
"headless" mode -- it can save to the usual formats, but you have to
render everything in an x11 window interactively first.
It might not be hard to modify t
humans, it should also have a line length limit.
Does anyone know of such a writer? Or something close?
Or any projects that could use such a writer?
--
Jonathan
--
http://mail.python.org/mailman/listinfo/python-list
ie nicely instead of trying to find better ways kill it.
-Jonathan
--
http://mail.python.org/mailman/listinfo/python-list
ultiple processes is an acceptable workaround; if
not, good luck with the rewrite in Java or something else with real
thread support. (IIRC Jython doesn't have a GIL; that might be an
option too.)
Python is a great tool but if you really need good threading support
you will have to look elsewhere.
-Jonathan
--
http://mail.python.org/mailman/listinfo/python-list
Unless you're doing anything that would require distributed locking.
Many if not most such projects do, which is why almost everyone prefers
to use threads on an SMP machine instead of splitting it across
multiple smaller boxes.
-Jonathan
--
http://mail.python.org/mailman/listinfo/python-list
Peter Hansen wrote:
> Jonathan Ellis wrote:
> > Peter Hansen wrote:
> >>Or investigate the use of Irmen's Pyro package and how it could let you
> >>almost transparently move your code to a *multi-process* architecture
> >
> > Unless you're doin
ed to use
exec instead of eval. Eval works with expressions; for statements you
need exec.
I blogged a brief example of tclpython over here:
http://spyced.blogspot.com/2005/06/tale-of-wiki-diff-implementation.html
-Jonathan
--
http://mail.python.org/mailman/listinfo/python-list
nion that
> web programming should feel no different from desktop programming.
If you're coming from a PHP background, you'll find Spyce's learning
curve even shallower.
http://spyce.sourceforge.net
-Jonathan
--
http://mail.python.org/mailman/listinfo/python-list
#ifdef def
Donn Cave wrote:
> Quoth MrEntropy <[EMAIL PROTECTED]>:
>
> | I'm having a little trouble getting an idea running. I am writing a C
> | program which is really a frontend to a Python program. Now, my C
> | program starts up, does some initialisation like initialisation of it's
>
from os import system
system ("start http://www.python.org/";)
--
http://mail.python.org/mailman/listinfo/python-list
Demos and downloads are available at http://spyce.sourceforge.net/.
Changelog is at http://svn-hosting.com/svn/spyce/trunk/spyce/CHANGES.
Jonathan Ellis
http://spyced.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
his magic 64 number comes from, so I can
increase it?
Illustration follows.
-Jonathan
#
# start this, then immediately start the other
# _on another machine_
import socket, time
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.bind(('', 3001))
time.sleep(5)
while True:
://skunkweb.sourceforge.net/pydo2.html) is a Python ORM tool
that does this well (*cough* better than sqlobject *cough*).
-Jonathan
--
http://mail.python.org/mailman/listinfo/python-list
author. This will be _much_
easier than doing it by hand.
-Jonathan
--
http://mail.python.org/mailman/listinfo/python-list
lassName="Idle")
File "c:\python20\lib\lib-tk\Tkinter.py", line 1482, in __init__
self.tk = _tkinter.create(screenName, baseName, className)
TclError: unknown color name "white "
C:\Python20\Tools\idle>
Thanks in advance,
Jonathan Polley
jwpolley rockwel
is string comes
> from some per-user configuration that may well explain your problem.
>
> Ciao, MM
Where do I have to go in order to fix it? It follows them from
computer to computer...
Thanks,
Jonathan Polley
--
http://mail.python.org/mailman/listinfo/python-list
he process of reading what might be a prompt
string.
This will of course increase performance in the
limiting case of when there are zero prompt
strings, and expensive system calls.
This problem of non-blocking input on Windows seems
to arise often. I hope my remarks might be helpful
to others.
Paul Rubin wrote:
Jonathan Fine <[EMAIL PROTECTED]> writes:
My question is this: Under Windows, is it possible
to read as many bytes as are available from stdout,
without blocking?
I think Windows implements non-blocking i/o calls. However the
traditional (to some) Python or Java appro
fraca7 wrote:
Jonathan Fine a écrit :
Paul Rubin wrote:
As I recall, some posts to this list say that Windows provides
non-blocking i/o for sockets but not for files.
No, Windows does provide non-blocking I/O for regular files, but it's a
completely different mechanism than the one us
GiddyJP wrote:
# do this once
import Trespass
pattern = Trespass.Pattern()
pattern.addRegExp(r'struct {', 1)
pattern.addRegExp(r'typedef struct {', 2)
pattern.addRegExp(r'something else', 3)
Minor correction... in this module { always needs to be escaped if not
indicating a
ep should be to identify yourself as IE.
opener = urllib2.build_opener(...)
opener.addheaders = [("User-Agent", "whatever IE calls itself these
days")]
-Jonathan
--
http://mail.python.org/mailman/listinfo/python-list
Hi
I'm looking for a simple Python + Tk text editor.
I want it as a building block/starting point.
I need basic functions only:
open a file, save a file, new file etc.
It has to be open source.
Anyone know of a candidate?
--
Jonathan
http://qatex.sourceforge.org
--
http://mail.python.org/ma
Paul Rubin wrote:
Jonathan Fine <[EMAIL PROTECTED]> writes:
I'm looking for a simple Python + Tk text editor.
I want it as a building block/starting point.
Something wrong with IDLE?
Thanks for this suggestion.
For some reason, I did not think of IDLE as an editor.
Must have been a
l in simple contexts.
So what I'm really wanting to do is provide a component for
projects such as e:doc.
Any, this might be a bit off-topic.
And thanks again for the link.
--
Jonathan
http://qatex.sourceforge.net
--
http://mail.python.org/mailman/listinfo/python-list
<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hello,
>
> I was looking at this:
> http://docs.python.org/lib/module-struct.html
> and tried the following
>
import struct
struct.calcsize('h')
> 2
struct.calcsize('b')
> 1
struct.calcsize('bh')
> 4
>
> I would hav
I am looking for a python robot that Van Rossum released with python
0.9.8. It may have been the first web robot (see
http://www.webhistory.org/www.lists/www-talk.1993q1/0060.html).
I've had no luck finding the code for the robot or the 0.9.8 tarball.
Can anyone help me out?
Thanks.
--
http://
http://www.meetup.com/PyRochesterMN
First meeting planned for Thu 28th January 2016
--
Jonathan Hartley
tart...@tartley.com
+1 507-513-1101
--
https://mail.python.org/mailman/listinfo/python-list
Dear Manager,
(Please forward this to your CEO, because this is urgent. Thanks!)
This is Jonathan Qin---the manager of domain name registration and solution
center in China. On February 29th, 2016, we received an application from Baiyao
Holdings Ltd requested “python” as their internet keyword
What is the relative maturity of different Python implementations in
JavaScript? Are any of the implementations ready to rely on?
--
[image: Christos Jonathan Seth Hayward] <http://jonathanscorner.com/>
Jonathan S. Hayward, a full stack web developer with Python/Django and
AngularJS/
@all, thanks. I think I have Brython to try out first and others to maybe
fall back on, which is the kind of information I wanted.
Thanks,
On Mon, Feb 16, 2015 at 3:59 PM, Jonathan Hayward <
jonathan.hayw...@pobox.com> wrote:
> @all, thanks. I think I have Brython to try out first a
On 31 Mar 2014 00:21, "D. Xenakis" wrote:
>
... Snip ...
> What i need is to develop an android looking program (entirelly in
python) for windows, but dunno if this is possible (most propably is), and
which tool between those would help me most: tkinter - wxpython - pyqt -
pygtk .
>
> Any exampl
Je sais qu'il y a plein d'information à lire un peu partout, mais j'ai vraiment
du mal à voir pourquoi Python est si fantastique...
Je m'explique
Pour moi python c'est un langage de script très cryptique avec des noms de
méthodes courts, pas claire, dans une identation pas toujours facile à
Why is array.array('u') deprecated?
Will we get an alternative for a character array or mutable unicode string?
Thanks!
Jonathan
--
https://mail.python.org/mailman/listinfo/python-list
Le vendredi 8 mai 2015 12:29:15 UTC+2, Steven D'Aprano a écrit :
> On Fri, 8 May 2015 07:14 pm, jonathan.slenders wrote:
>
> > Why is array.array('u') deprecated?
> >
> > Will we get an alternative for a character array or mutable unicode
> > string?
>
>
> Good question.
>
> Of the three main
> Can you expand a bit on how array("u") helps here? Are the matches in the
> gigabyte range?
I have a string of unicode characters, e.g.:
data = array.array('u', u'x' * 10)
Then I need to change some data in the middle of this string, for instance:
data[50] = 'y'
Then I want to u
, match=b'y'>
> >>> data[101] = "z"
> >>> re.search(b"y", data)
> <_sre.SRE_Match object; span=(400, 401), match=b'y'>
> >>> re.search(b"yz", data)
> >>> re.search(b"y\0\0\0z", data)
> <_sre.SRE_Match object; span=(400, 405), match=b'y\x00\x00\x00z'>
>
> but if that is good enough you can use a bytearray in the first place.
Maybe I'll try that. Thanks for the suggestions!
Jonathan
--
https://mail.python.org/mailman/listinfo/python-list
n regex describes, and if at some point all the
input characters are consumed, it's a match. (We don't have to run the regex
until the end.) But I cannot find any library that does it...
Thanks a lot, if anyone knows the answer to this question!
Cheers,
Jonathan
--
https://mail.python.org/mailman/listinfo/python-list
> > Logically, I'd think it should be possible by running the input string
> > against the state machine that the given regex describes, and if at some
> > point all the input characters are consumed, it's a match. (We don't have
> > to run the regex until the end.) But I cannot find any librar
Le mercredi 8 octobre 2014 01:40:11 UTC+2, MRAB a écrit :
> If you're not interested in generating an actual regex, but only in
>
> matching the prefix, then it sounds like you want "partial matching".
>
>
>
> The regex module supports that:
>
>
>
> https://pypi.python.org/pypi/regex
Wow, t
On Thursday, September 8, 2011 1:29:26 AM UTC+1, Steven D'Aprano wrote:
> Steven D'Aprano wrote:
>
> Other than that, is there any justification
> for this rule? Any Java fans want to defend this?
>
> If "one class per file", why not "one method per class" too? Why is the
> second rule any more si
Perhaps a more idiomatic way of achieving the same thing is to use a factory
function, which returns instances of different classes:
def PersonFactory(foo):
if foo:
return Person()
else:
return Child()
Apologies if the code is messed up, I'm posting from Google g
On Saturday, October 1, 2011 8:06:43 AM UTC+1, Chris Rebert wrote:
> On Fri, Sep 30, 2011 at 11:31 PM, Jason Swails wrote:
> > I'm probably missing something pretty obvious, but I was wondering if there
> > was a way of executing an arbitrary line of code somehow (such as a line of
> > code based
Fair points Steven. Thanks for further refining my initial refinement. :-)
--
http://mail.python.org/mailman/listinfo/python-list
1 - 100 of 616 matches
Mail list logo