J wrote:
> Thanks for your answers, especially Chris Rebert and Paul McGuire's. I
> have a question:
> How far does Python go in the Game Development field? (Using Python
> only, no extensions)
Hey J,
Python's all about the libraries (extensions), you won't be able to do
much without them but th
Steven D'Aprano:
> There's less code, fewer bugs and lines. Less applies to continuous
> quantities, like weight and "amount of code", and fewer applies to
> countable quantities.
Thank you, I'll try to improve my use of the language.
> Within reason, naturally. There's a reason why we write:
>
On Sun, 08 Feb 2009 13:34:50 -0800, bearophileHUGS wrote:
> Gabriel Genellina:
>> bearophile:
>> > - Generally I suggest to learn to code in the small, using as little
>> > code as possible.
>>
>> I completely agree with all the above suggestions, except this last
>> one. Ok, I think I know what y
J wrote:
What are your thoughts on this module I created?
'''
A Python Module created by a High School Student.
Includes rev(), reet(), and leet().
Gutsy of you to post this.
Setup:
* Save to Python Directory\Lib\ as nift.py
Add-in modules and package
On Feb 8, 3:28 pm, Chris Rebert wrote:
> This I disagree with as being unnecessarily clever; the dict literal
> is just fine as-is and the zip() makes it less clear. However, I would
> definitely rewrite the dict to use less lines, which, after removing
> the capital dupes (as I mentioned in my po
On Sun, Feb 8, 2009 at 2:45 PM, J wrote:
> Thanks for your answers, especially Chris Rebert and Paul McGuire's. I
> have a question:
> How far does Python go in the Game Development field? (Using Python
> only, no extensions)
You pretty much need to integrate with some C(++) libraries in order
to
Thanks for your answers, especially Chris Rebert and Paul McGuire's. I
have a question:
How far does Python go in the Game Development field? (Using Python
only, no extensions)
--
http://mail.python.org/mailman/listinfo/python-list
Gabriel Genellina:
> bearophile:
> > - Generally I suggest to learn to code in the small, using as little
> > code as possible.
>
> I completely agree with all the above suggestions, except this last one.
> Ok, I think I know what you mean, but a beginner might understand this
> completely wron
On Sun, Feb 8, 2009 at 12:57 PM, Paul McGuire wrote:
> On Feb 8, 12:42 pm, J wrote:
>> What are your thoughts on this module I created?
>>
> Here are a few steps to illustrate some good basic Python idioms worth
> learning:
>
> Step 1: Replace many-branched if-elif with dict
>
> While translating
Paul McGuire:
> LEET_LETTERS = dict( zip("eEaAiItTsSoObB", "33441177550088") )
> def leet(s):
> return ''.join( LEET_LETTERS.get(c,c) for c in s )
This may be better:
from string import maketrans
def leet(txt):
leet_chars = maketrans("eEaAiItTsSoObB", "33441177550088")
return txt.tra
On Feb 8, 12:42 pm, J wrote:
> What are your thoughts on this module I created?
>
Here are a few steps to illustrate some good basic Python idioms worth
learning:
Step 1: Replace many-branched if-elif with dict
While translating characters in a string is a special case that
usually warrants usin
En Sun, 08 Feb 2009 17:59:41 -0200, escribió:
More suggestions for a real-world Python programmer:
- There's code duplication, the original poster may express reet as a
composition of the other functions.
- A Python string/list/array can be inverted with [::-1]
- I suggest to convert the exampl
More suggestions for a real-world Python programmer:
- There's code duplication, the original poster may express reet as a
composition of the other functions.
- A Python string/list/array can be inverted with [::-1]
- I suggest to convert the examples of the main doscstring into
doctests.
- The mai
On Sun, Feb 8, 2009 at 10:42 AM, J wrote:
> What are your thoughts on this module I created?
* You should probably use individual docstrings for each function
rather than one giant module docstring
* Don't use 'list' as a variable name; it shadows the name of the
builtin list type
* You can use t
What are your thoughts on this module I created?
'''
A Python Module created by a High School Student.
Includes rev(), reet(), and leet().
Import nift
Function: nift.rev()
Description:Reverses a string
Usage: nift.rev('string')
15 matches
Mail list logo