Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!xlned.com!feeder3.xlned.com!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.015 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'postgresql': 0.07; 'suppose': 0.07; 'sql,': 0.09; 'subject:into': 0.09; 'subject:string': 0.09; 'subject:How': 0.10; 'python': 0.11; 'question.': 0.14; '5:30': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'higher-level': 0.16; 'list),': 0.16; 'personally,': 0.16; 'repr': 0.16; 'roy': 0.16; 'subject:already': 0.16; 'wrote:': 0.18; 'trying': 0.19; 'separate': 0.22; 'closely': 0.24; 'stick': 0.24; "i've": 0.25; 'values': 0.27; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; 'am,': 0.29; 'database,': 0.30; 'subject:list': 0.30; 'message- id:@mail.gmail.com': 0.30; "i'm": 0.30; 'relational': 0.31; 'lists': 0.32; 'quite': 0.32; 'worked': 0.33; 'table': 0.34; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'really': 0.36; 'possible': 0.36; 'list': 0.37; 'nov': 0.38; 'to:addr :python-list': 0.38; 'issue': 0.38; 'structure': 0.39; 'though,': 0.39; 'to:addr:python.org': 0.39; 'either': 0.39; 'how': 0.40; 'even': 0.60; 'most': 0.60; "you're": 0.61; 'back': 0.62; 'such': 0.63; 'field': 0.63; 'talking': 0.65; 'smith': 0.68; 'foreign': 0.74; 'article': 0.77; '9:00': 0.91; 'subject:add': 0.91; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=PIa7mLzB/HstjEifsbGK6XY2qBZdEX9mLMgQu21kE+M=; b=ZomMa75019k7Z96fvIYGFlQSNn0DNq50bW3i2m7iDs2RVeUW8ABlUtNQjVsoZyI2Km r4doWDktze+7O0iHuRcC8M+iHlpHp9NKIPQu2ONnoTrU4DR7BR3gKaGFKscdOk03AUYz 1ibdCZ8yk7FQdiDC0dwX1cTzrHvVfD2ANKY6A6FatZWuNOc4mJUuAf9yRnFwl9QV27Wr +Lr+8cqpCVrp0jvo/TOXLd0UlABe+DTiYWb011ya2a3qz6Du5A0TEuc59k8JI01JiqaK 8QaL1e8/YUK6jovlmExHwcxNgJKlDR73m+KWAOqCS63sM7TvKEyriMrIoto/MrJj5S3X zDJQ== MIME-Version: 1.0 X-Received: by 10.68.212.37 with SMTP id nh5mr9935232pbc.16.1383430381848; Sat, 02 Nov 2013 15:13:01 -0700 (PDT) In-Reply-To: References: Date: Sun, 3 Nov 2013 09:13:01 +1100 Subject: Re: How to add a current string into an already existing list From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 26 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1383430391 news.xs4all.nl 15963 [2001:888:2000:d::a6]:36697 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:58353 On Sun, Nov 3, 2013 at 9:00 AM, Roy Smith wrote: > In article , > Chris Angelico wrote: > >> On Sun, Nov 3, 2013 at 5:30 AM, Jussi Piitulainen >> wrote: >> > Suppose a database allowed structured values like lists of strings, >> > lists of numbers, or even lists of such lists and more. Then it would >> > actually be a Python issue how best to support that database. >> >> PostgreSQL supports some higher-level structures like arrays. >> Personally, though, I think the most general representation of a >> Python list in a database is either a varchar field with some form of >> structure (eg the repr of a list), or a separate table with a foreign >> key back to this one. > > When you say "database" here, you're really talking about relational > databases. There are other kinds. Quite right, my apologies. I'm talking about the classic relational database accessed by SQL, which is what the OP's currently working with (MySQL). I've worked with other types of database, but was trying to stick as closely as possible to the question. But yes, the clarification is important here. ChrisA